| Conditions | 2 |
| Paths | 6 |
| Total Lines | 11 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2.0438 |
| Changes | 4 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | 1 | public function processMessage(AMQPMessage $msg) |
|
| 18 | { |
||
| 19 | try { |
||
| 20 | 1 | $msg->delivery_info['channel']->basic_ack($msg->delivery_info['delivery_tag']); |
|
|
|
|||
| 21 | 1 | $result = call_user_func($this->callback, $msg); |
|
| 22 | 1 | $result = call_user_func($this->serializer, $result); |
|
| 23 | 1 | $this->sendReply($result, $msg->get('reply_to'), $msg->get('correlation_id')); |
|
| 24 | 1 | $this->consumed++; |
|
| 25 | 1 | $this->maybeStopConsumer(); |
|
| 26 | } catch (\Exception $e) { |
||
| 27 | $this->sendReply('error: ' . $e->getMessage(), $msg->get('reply_to'), $msg->get('correlation_id')); |
||
| 28 | } |
||
| 42 |