Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
26 | 2 | public function __invoke(Message $message, string $routingKey = null): ProducerInterface |
|
27 | { |
||
28 | $this |
||
29 | 2 | ->client |
|
30 | 2 | ->channel() |
|
31 | 2 | ->basic() |
|
32 | 2 | ->publish( |
|
33 | 2 | (new Publish($message)) |
|
34 | 2 | ->to($this->exchange) |
|
35 | 2 | ->withRoutingKey($routingKey ?? '') |
|
36 | ); |
||
37 | |||
38 | 2 | return $this; |
|
39 | } |
||
40 | } |
||
41 |