@@ -111,7 +111,7 @@ public function pushRaw($payload, $queue = null, array $options = [])
111111 'delivery_mode ' => 2 ,
112112 ];
113113
114- if (isset ( $ this ->attempts ) === true ) {
114+ if ($ this ->attempts !== null ) {
115115 $ headers ['application_headers ' ] = [self ::ATTEMPT_COUNT_HEADERS_KEY => ['I ' , $ this ->attempts ]];
116116 }
117117
@@ -204,7 +204,7 @@ private function declareQueue($name)
204204 $ name = $ this ->getQueueName ($ name );
205205 $ exchange = $ this ->configExchange ['name ' ] ?: $ name ;
206206
207- if ($ this ->declareExchange && !in_array ($ exchange , $ this ->declaredExchanges )) {
207+ if ($ this ->declareExchange && !in_array ($ exchange , $ this ->declaredExchanges , true )) {
208208 // declare exchange
209209 $ this ->channel ->exchange_declare (
210210 $ exchange ,
@@ -217,7 +217,7 @@ private function declareQueue($name)
217217 $ this ->declaredExchanges [] = $ exchange ;
218218 }
219219
220- if ($ this ->declareBindQueue && !in_array ($ name , $ this ->declaredQueues )) {
220+ if ($ this ->declareBindQueue && !in_array ($ name , $ this ->declaredQueues , true )) {
221221 // declare queue
222222 $ this ->channel ->queue_declare (
223223 $ name ,
@@ -240,7 +240,7 @@ private function declareQueue($name)
240240 * @param string $destination
241241 * @param DateTime|int $delay
242242 *
243- * @return string
243+ * @return array
244244 */
245245 private function declareDelayedQueue ($ destination , $ delay )
246246 {
@@ -251,7 +251,7 @@ private function declareDelayedQueue($destination, $delay)
251251 $ exchange = $ this ->configExchange ['name ' ] ?: $ destination ;
252252
253253 // declare exchange
254- if (!in_array ($ exchange , $ this ->declaredExchanges )) {
254+ if (!in_array ($ exchange , $ this ->declaredExchanges , true )) {
255255 $ this ->channel ->exchange_declare (
256256 $ exchange ,
257257 $ this ->configExchange ['type ' ],
@@ -262,7 +262,7 @@ private function declareDelayedQueue($destination, $delay)
262262 }
263263
264264 // declare queue
265- if (!in_array ($ name , $ this ->declaredQueues )) {
265+ if (!in_array ($ name , $ this ->declaredQueues , true )) {
266266 $ this ->channel ->queue_declare (
267267 $ name ,
268268 $ this ->configQueue ['passive ' ],
@@ -315,7 +315,7 @@ public function setCorrelationId($id)
315315 */
316316 public function getCorrelationId ()
317317 {
318- return $ this ->correlationId ?: uniqid ();
318+ return $ this ->correlationId ?: uniqid ('' , true );
319319 }
320320
321321 /**
0 commit comments