Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
28 | 2 | public function publish($queue, $command, array $options = []) |
|
29 | { |
||
30 | 2 | if (!is_subclass_of($command, CommandInterface::class)) { |
|
31 | 1 | throw new \RuntimeException('Class does not implement CommandInterface: ' . $command); |
|
32 | } |
||
33 | |||
34 | 1 | $job = json_encode(['command' => $command, 'options' => $options]); |
|
35 | 1 | $this->client->rpush($queue, $job); |
|
36 | 1 | } |
|
37 | } |
||
38 |