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