Conditions | 4 |
Paths | 5 |
Total Lines | 18 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
31 | 4 | public function execute($command, callable $next) |
|
32 | { |
||
33 | 4 | if ($command instanceof Message) { |
|
34 | 1 | $this->producer->produce($command); |
|
35 | |||
36 | 1 | return; |
|
37 | } |
||
38 | |||
39 | 3 | if ($command instanceof QueuedCommand) { |
|
40 | 2 | $command = $command->getCommand(); |
|
41 | 2 | } |
|
42 | |||
43 | 3 | if ($command instanceof QueueCommand) { |
|
44 | 1 | $command = $command->getCommand(); |
|
45 | 1 | } |
|
46 | |||
47 | 3 | return $next($command); |
|
48 | } |
||
49 | } |
||
50 |