/** * @param Server $server */ public function __construct(Server $server) { $this->server = $server; $this->tubeStatus = new TubeStatus(); $this->commandFactory = CommandFactory::instance(); $this->jobFactory = JobFactory::instance(); }
/** * @param string $tubeName * @param Server $server * @param JobFactory|null $jobFactory */ public function __construct($tubeName, Server $server, JobFactory $jobFactory = null) { $this->tubeStatus = new TubeStatus(); $this->tubeStatus->setCurrentTube($tubeName); $this->server = $server; $this->jobFactory = $jobFactory ?: JobFactory::instance(); $this->commandFactory = CommandFactory::instance(); }
public function testInstance_consecutiveCalls_returnSame() { $instance = JobFactory::instance(); $this->assertSame($instance, JobFactory::instance()); }
/** * @param ResponseOath $oath * @param JobFactory|null $jobFactory */ public function __construct(ResponseOath $oath, JobFactory $jobFactory = null) { $this->jobFactory = $jobFactory ?: JobFactory::instance(); $this->responseOath = $oath; }