1 | <?php |
||
11 | class Queue implements QueueInterface |
||
12 | { |
||
13 | private $connectionManager; |
||
14 | private $connection; |
||
15 | private $channel; |
||
16 | private $queueBag; |
||
17 | private $callback; |
||
18 | private $logger; |
||
19 | |||
20 | public function __construct(ConnectionManager $connectionManager, QueueBagInterface $queueBag, LoggerInterface $logger) |
||
27 | |||
28 | /** |
||
29 | * @return CmobiAMQPChannel |
||
30 | * @throws InvalidAMQPChannelException |
||
31 | */ |
||
32 | protected function getChannel() |
||
45 | |||
46 | protected function createQueue() |
||
61 | |||
62 | /** |
||
63 | * Declare and start queue in broker |
||
64 | */ |
||
65 | public function start() |
||
83 | |||
84 | /** |
||
85 | * @return QueueBagInterface |
||
86 | */ |
||
87 | public function getQueuebag() |
||
91 | |||
92 | /** |
||
93 | * @param QueueCallbackInterface $callback |
||
94 | */ |
||
95 | public function setCallback(QueueCallbackInterface $callback) |
||
99 | |||
100 | /** |
||
101 | * @return QueueCallbackInterface |
||
102 | */ |
||
103 | public function getCallback() |
||
107 | |||
108 | /** |
||
109 | * @return ConnectionManager |
||
110 | */ |
||
111 | public function getConnectionManager() |
||
115 | |||
116 | /** |
||
117 | * @return CmobiAMQPConnection |
||
118 | */ |
||
119 | public function getConnection() |
||
123 | |||
124 | /** |
||
125 | * Retry connect to message broker until it can. |
||
126 | */ |
||
127 | /** |
||
128 | * @param CmobiAMQPConnection|null $connection |
||
129 | * @return CmobiAMQPChannel |
||
130 | */ |
||
131 | public function forceReconnect(CmobiAMQPConnection $connection = null) |
||
150 | } |
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: