| Conditions | 2 | 
| Paths | 2 | 
| Total Lines | 14 | 
| Code Lines | 8 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 38 | public function send(MessageInterface $message): MessageSendInterface | ||
| 39 |     { | ||
| 40 | $errorCode = null; | ||
| 41 | $json = $message->toJson(); | ||
| 42 | |||
| 43 |         if (false === msg_send($this->queue, $this->type, $json, false, true, $errorCode)) { | ||
| 44 | throw new MessageSendException( | ||
| 45 |                 sprintf(MessageSendException::MESSAGE_SEND_FAILED, sprintf(' (SystemV error code %d)', $errorCode)), | ||
| 46 | MessageSendException::CODE_SEND_FAILED | ||
| 47 | ); | ||
| 48 | } | ||
| 49 | |||
| 50 | return $this; | ||
| 51 | } | ||
| 52 | } | ||
| 53 |