Conditions | 4 |
Paths | 4 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
36 | 2 | public function produceQueues($command): array |
|
37 | { |
||
38 | 2 | foreach ($this->commandsClasses as $commandClass) { |
|
39 | 2 | if ($command instanceof $commandClass) { |
|
40 | 1 | $queue = new CommandJob($command, $this->queue, $this->exchange); |
|
41 | |||
42 | 1 | if ($this->delaySeconds > 0) { |
|
43 | 1 | $queue->setScheduleAt((new \DateTime())->modify('+' . $this->delaySeconds . ' second')); |
|
44 | } |
||
45 | |||
46 | 2 | return [$queue]; |
|
47 | } |
||
48 | } |
||
49 | |||
50 | 1 | return []; |
|
51 | } |
||
52 | } |
||
53 |