Commit 5cf6c80a authored by Juan Manuel Solaro's avatar Juan Manuel Solaro

(fix) lint fixes

1 merge request!294WIP: epic/post-scheduler
Pipeline #78672903 running with stages
......@@ -306,7 +306,7 @@ class blog implements Interfaces\Api
'status' => 'error',
'message' => $e->getMessage(),
]);
}
}
}
if (!$blog->isPublished()) {
......
......@@ -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()) {
......
......@@ -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 */
......
......@@ -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;
}
}
......@@ -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;
}
}
......@@ -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
}
......@@ -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) ;
}
}
......@@ -71,5 +71,4 @@ class Repository
return $result['count'] ?? 0;
}
}
......@@ -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;
......
......@@ -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()
......
......@@ -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);
}
......
......@@ -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'];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment