Conditions | 1 |
Paths | 1 |
Total Lines | 20 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
30 | public function toClosure() |
||
31 | { |
||
32 | return function (AMQPMessage $message) { |
||
33 | $response = $this->getQueueService()->handle($message); |
||
34 | |||
35 | $amqpResponse = new CmobiAMQPMessage( |
||
36 | (string) $response, |
||
37 | ['correlation_id' => $message->get('correlation_id')] |
||
38 | ); |
||
39 | |||
40 | $message->delivery_info['channel']->basic_publish( |
||
41 | $amqpResponse, |
||
42 | '', |
||
43 | $message->get('reply_to') |
||
44 | ); |
||
45 | $message->delivery_info['channel']->basic_ack( |
||
46 | $message->delivery_info['delivery_tag'] |
||
|
|||
47 | ); |
||
48 | }; |
||
49 | } |
||
50 | } |
||
51 |
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: