for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace flipbox\queue\jobs\traits;
use flipbox\queue\events\RegisterJobs;
use yii\base\Event;
trait EventCollectionTrait
{
use CollectionTrait {
addJob as parentAddJob;
addJobs as parentAddJobs;
findJob as parentFindJob;
getJobs as parentGetJobs;
}
/**
* @param $name
* @param Event|null $event
* @return mixed
*/
public abstract function trigger($name, Event $event = null);
* @inheritdoc
protected function addJobs(array $jobs = [])
$this->ensureJobs();
return $this->parentAddJobs($jobs);
parentAddJobs()
flipbox\queue\jobs\traits\EventCollectionTrait
addJobs()
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.
public function addJob($key, $job)
return $this->parentAddJob($key, $job);
parentAddJob()
addJob()
public function getJobs()
return $this->parentGetJobs();
parentGetJobs()
getJobs()
public function findJob($identifier)
return $this->parentFindJob($identifier);
parentFindJob()
findJob()
* Ensure the jobs are all loaded
*
* @return static
protected function ensureJobs()
if (null === $this->jobs) {
$this->jobs = [];
$this->trigger(
RegisterJobs::EVENT_REGISTER_JOBS,
$event = new RegisterJobs()
);
$this->addJobs($event->jobs);
return $this;
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.