Skip to content
Next
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Minds Backend - Engine
Project
Project
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
241
Issues
241
List
Boards
Labels
Service Desk
Milestones
Merge Requests
30
Merge Requests
30
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
List
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Backend - Engine
Commits
5cf6c80a
Commit
5cf6c80a
authored
15 minutes ago
by
Juan Manuel Solaro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(fix) lint fixes
parent
34c8b96b
epic/post-scheduler
1 merge request
!294
WIP: epic/post-scheduler
Pipeline
#78672903
running with stages
Changes
12
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
23 additions
and
33 deletions
+23
-33
blog.php
Controllers/api/v1/blog.php
+1
-1
newsfeed.php
Controllers/api/v1/newsfeed.php
+2
-2
scheduled.php
Controllers/api/v2/feeds/scheduled.php
+6
-6
TimeCreatedDelegate.php
Core/Blogs/Delegates/TimeCreatedDelegate.php
+0
-2
TimeCreatedDelegate.php
Core/Feeds/Activity/Delegates/TimeCreatedDelegate.php
+0
-2
EntityTimeCreated.php
Core/Feeds/Scheduled/EntityTimeCreated.php
+2
-3
Manager.php
Core/Feeds/Scheduled/Manager.php
+1
-3
Repository.php
Core/Feeds/Scheduled/Repository.php
+0
-1
Activity.php
Entities/Activity.php
+4
-4
CreateActivitySpec.php
Spec/Core/Blogs/Delegates/CreateActivitySpec.php
+1
-1
ManagerSpec.php
Spec/Core/Feeds/Scheduled/ManagerSpec.php
+3
-5
RepositorySpec.php
Spec/Core/Feeds/Scheduled/RepositorySpec.php
+3
-3
No files found.
Controllers/api/v1/blog.php
View file @
5cf6c80a
...
...
@@ -306,7 +306,7 @@ class blog implements Interfaces\Api
'status'
=>
'error'
,
'message'
=>
$e
->
getMessage
(),
]);
}
}
}
if
(
!
$blog
->
isPublished
())
{
...
...
This diff is collapsed.
Click to expand it.
Controllers/api/v1/newsfeed.php
View file @
5cf6c80a
...
...
@@ -526,7 +526,7 @@ class newsfeed implements Interfaces\Api
'status'
=>
'error'
,
'message'
=>
$e
->
getMessage
(),
]);
}
}
}
$save
->
setEntity
(
$activity
)
...
...
@@ -551,7 +551,7 @@ class newsfeed implements Interfaces\Api
'status'
=>
'error'
,
'message'
=>
$e
->
getMessage
(),
]);
}
}
}
if
(
$user
->
isMature
())
{
...
...
This diff is collapsed.
Click to expand it.
Controllers/api/v2/feeds/scheduled.php
View file @
5cf6c80a
...
...
@@ -12,12 +12,12 @@ use Minds\Interfaces;
class
scheduled
implements
Interfaces\Api
{
/**
* Equivalent to HTTP GET method
* @param array $pages
* @return mixed|null
* @throws \Exception
*/
/**
* Equivalent to HTTP GET method
* @param array $pages
* @return mixed|null
* @throws \Exception
*/
public
function
get
(
$pages
)
{
/** @var User $currentUser */
...
...
This diff is collapsed.
Click to expand it.
Core/Blogs/Delegates/TimeCreatedDelegate.php
View file @
5cf6c80a
...
...
@@ -10,7 +10,6 @@ use Minds\Core\Feeds\Scheduled\EntityTimeCreated;
class
TimeCreatedDelegate
{
/** @var Core\Feeds\Scheduled\EntityTimeCreated $entityTimeCreated */
protected
$entityTimeCreated
;
...
...
@@ -46,5 +45,4 @@ class TimeCreatedDelegate
$this
->
entityTimeCreated
->
validate
(
$entity
,
$time_created
,
$time_sent
);
return
true
;
}
}
This diff is collapsed.
Click to expand it.
Core/Feeds/Activity/Delegates/TimeCreatedDelegate.php
View file @
5cf6c80a
...
...
@@ -10,7 +10,6 @@ use Minds\Core\Feeds\Scheduled\EntityTimeCreated;
class
TimeCreatedDelegate
{
/** @var Core\Feeds\Scheduled\EntityTimeCreated $entityTimeCreated */
protected
$entityTimeCreated
;
...
...
@@ -46,5 +45,4 @@ class TimeCreatedDelegate
$this
->
entityTimeCreated
->
validate
(
$entity
,
$time_created
,
$time_sent
);
return
true
;
}
}
This diff is collapsed.
Click to expand it.
Core/Feeds/Scheduled/EntityTimeCreated.php
View file @
5cf6c80a
...
...
@@ -6,11 +6,10 @@ class EntityTimeCreated
{
/**
* EntityTimeCreated constructor.
*
*
*/
public
function
__construct
()
{
}
public
function
validate
(
$entity
,
$time_created
,
$time_sent
)
...
...
@@ -26,4 +25,4 @@ class EntityTimeCreated
$entity
->
setTimeCreated
(
$time_created
);
$entity
->
setTimeSent
(
$time_sent
);
}
}
\ No newline at end of file
}
This diff is collapsed.
Click to expand it.
Core/Feeds/Scheduled/Manager.php
View file @
5cf6c80a
...
...
@@ -9,8 +9,7 @@ class Manager
public
function
__construct
(
$repository
=
null
)
{
)
{
$this
->
repository
=
$repository
?:
new
Repository
;
}
...
...
@@ -22,5 +21,4 @@ class Manager
{
return
$this
->
repository
->
getScheduledCount
(
$opts
)
;
}
}
This diff is collapsed.
Click to expand it.
Core/Feeds/Scheduled/Repository.php
View file @
5cf6c80a
...
...
@@ -71,5 +71,4 @@ class Repository
return
$result
[
'count'
]
??
0
;
}
}
This diff is collapsed.
Click to expand it.
Entities/Activity.php
View file @
5cf6c80a
...
...
@@ -732,10 +732,10 @@ class Activity extends Entity
return
"urn:activity:
{
$this
->
getGuid
()
}
"
;
}
/**
* Return time_sent
* @return int
*/
/**
* Return time_sent
* @return int
*/
public
function
getTimeSent
()
{
return
$this
->
time_sent
;
...
...
This diff is collapsed.
Click to expand it.
Spec/Core/Blogs/Delegates/CreateActivitySpec.php
View file @
5cf6c80a
...
...
@@ -101,7 +101,7 @@ class CreateActivitySpec extends ObjectBehavior
->
shouldReturn
(
true
);
}
function
it_should_save_when_previous_activity
(
public
function
it_should_save_when_previous_activity
(
Blog
$blog
)
{
$blog
->
getGuid
()
...
...
This diff is collapsed.
Click to expand it.
Spec/Core/Feeds/Scheduled/ManagerSpec.php
View file @
5cf6c80a
...
...
@@ -10,7 +10,6 @@ use PhpSpec\ObjectBehavior;
class
ManagerSpec
extends
ObjectBehavior
{
/** @var Repository */
protected
$repository
;
...
...
@@ -20,15 +19,14 @@ class ManagerSpec extends ObjectBehavior
/** @var Search */
protected
$search
;
function
let
(
public
function
let
(
Repository
$repository
)
{
)
{
$this
->
repository
=
$repository
;
$this
->
beConstructedWith
(
$repository
);
}
function
it_is_initializable
()
public
function
it_is_initializable
()
{
$this
->
shouldHaveType
(
Manager
::
class
);
}
...
...
This diff is collapsed.
Click to expand it.
Spec/Core/Feeds/Scheduled/RepositorySpec.php
View file @
5cf6c80a
...
...
@@ -17,7 +17,7 @@ class RepositorySpec extends ObjectBehavior
/** @var Config */
protected
$config
;
function
let
(
Client
$client
,
Config
$config
)
public
function
let
(
Client
$client
,
Config
$config
)
{
$this
->
client
=
$client
;
$this
->
config
=
$config
;
...
...
@@ -29,12 +29,12 @@ class RepositorySpec extends ObjectBehavior
$this
->
beConstructedWith
(
$client
,
$config
);
}
function
it_is_initializable
()
public
function
it_is_initializable
()
{
$this
->
shouldHaveType
(
Repository
::
class
);
}
function
it_should_count_scheduled_activities
()
public
function
it_should_count_scheduled_activities
()
{
$opts
=
[
'container_guid'
=>
9999
,
'type'
=>
'activity'
];
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment