1 | <?php |
||
14 | class Consumer implements ConsumerInterface |
||
15 | { |
||
16 | /** |
||
17 | * @var QueueInterface |
||
18 | */ |
||
19 | protected $queue; |
||
20 | |||
21 | /** |
||
22 | * @var ProcessorInterface |
||
23 | */ |
||
24 | protected $processor; |
||
25 | |||
26 | /** |
||
27 | * @var EventDispatcherInterface |
||
28 | */ |
||
29 | protected $dispatcher; |
||
30 | |||
31 | /** |
||
32 | * @var callable |
||
33 | */ |
||
34 | protected $callback; |
||
35 | |||
36 | /** |
||
37 | * @var bool |
||
38 | */ |
||
39 | protected $nackRequeue = false; |
||
40 | |||
41 | /** |
||
42 | * @param QueueInterface $queue |
||
43 | * @param ProcessorInterface $processor |
||
44 | * @param EventDispatcherInterface $dispatcher |
||
45 | */ |
||
46 | 10 | public function __construct(QueueInterface $queue, ProcessorInterface $processor, EventDispatcherInterface $dispatcher = null) |
|
76 | |||
77 | /** |
||
78 | * @inheritdoc |
||
79 | */ |
||
80 | 1 | public function getEventDispatcher() |
|
84 | |||
85 | /** |
||
86 | * @inheritdoc |
||
87 | */ |
||
88 | 1 | public function setNackRequeue($requeue) |
|
92 | |||
93 | /** |
||
94 | * @param callable $callback |
||
95 | */ |
||
96 | 10 | public function setCallback(callable $callback) |
|
100 | |||
101 | /** |
||
102 | * @inheritdoc |
||
103 | */ |
||
104 | 1 | public function get() |
|
112 | |||
113 | /** |
||
114 | * @inheritdoc |
||
115 | */ |
||
116 | 2 | public function ack(EnvelopeInterface $envelope) |
|
120 | |||
121 | /** |
||
122 | * @inheritdoc |
||
123 | */ |
||
124 | 4 | public function nack(EnvelopeInterface $envelope, $requeue = false) |
|
128 | |||
129 | /** |
||
130 | * @inheritdoc |
||
131 | */ |
||
132 | 3 | public function consume($consumerTag = null, $flags = QueueInterface::NOPARAM) |
|
136 | |||
137 | /** |
||
138 | * @param string $consumerTag |
||
139 | */ |
||
140 | 1 | public function cancel($consumerTag = '') |
|
144 | } |
||
145 |
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: