1 | <?php |
||
15 | class SyncConsumerHandler implements QueueHandler, LoggerAwareInterface |
||
16 | { |
||
17 | use LoggerAwareTrait; |
||
18 | |||
19 | /** @var QueueConsumer */ |
||
20 | private $consumer; |
||
21 | |||
22 | /** @var Driver */ |
||
23 | private $driver; |
||
24 | |||
25 | /** |
||
26 | * ConsumerHandler constructor. |
||
27 | * |
||
28 | * @param QueueConsumer $consumer |
||
29 | * @param Driver $driver |
||
30 | */ |
||
31 | public function __construct(QueueConsumer $consumer, Driver $driver) |
||
38 | |||
39 | /** |
||
40 | * Handle a message. |
||
41 | * |
||
42 | * @param Message $message |
||
43 | * |
||
44 | * @return bool |
||
45 | */ |
||
46 | public function handle(Message $message) |
||
53 | |||
54 | /** |
||
55 | * Modify and return the options for consumption. |
||
56 | * |
||
57 | * @param ConsumeOptions $options |
||
58 | * |
||
59 | * @return ConsumeOptions |
||
60 | */ |
||
61 | public function options(ConsumeOptions $options) |
||
65 | |||
66 | /** |
||
67 | * Handle the return value. |
||
68 | * |
||
69 | * @param Message $message |
||
70 | * @param string $returnValue |
||
71 | */ |
||
72 | private function handleSyncMessage(Message $message, $returnValue) |
||
97 | } |
||
98 |
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: