| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2.0185 |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 39 | 1 | public function __invoke(AMQPMessage $message) |
|
| 40 | { |
||
| 41 | 1 | $convertedMessage = $this->getMessageMapper()->toMessage($message); |
|
| 42 | 1 | $ret = call_user_func($this->callback, $convertedMessage, $this->queue); |
|
| 43 | 1 | if (false === $ret) { |
|
| 44 | $this->queue->cancel($message->delivery_info['consumer_tag']); |
||
|
|
|||
| 45 | } |
||
| 46 | 1 | return $ret; |
|
| 47 | } |
||
| 48 | |||
| 70 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: