@@ -204,7 +204,7 @@ protected function publishBatch($jobs, $data = '', $queue = null): void
204204 /**
205205 * @throws AMQPProtocolChannelException
206206 */
207- public function bulkRaw (string $ payload , string $ queue = null , array $ options = []): int |string |null
207+ public function bulkRaw (string $ payload , ? string $ queue = null , array $ options = []): int |string |null
208208 {
209209 [$ destination , $ exchange , $ exchangeType , $ attempts ] = $ this ->publishProperties ($ queue , $ options );
210210
@@ -397,7 +397,7 @@ public function deleteExchange(string $name, bool $unused = false): void
397397 *
398398 * @throws AMQPProtocolChannelException
399399 */
400- public function isQueueExists (string $ name = null ): bool
400+ public function isQueueExists (? string $ name = null ): bool
401401 {
402402 $ queueName = $ this ->getQueue ($ name );
403403
@@ -484,7 +484,7 @@ public function bindQueue(string $queue, string $exchange, string $routingKey =
484484 /**
485485 * Purge the queue of messages.
486486 */
487- public function purge (string $ queue = null ): void
487+ public function purge (? string $ queue = null ): void
488488 {
489489 // create a temporary channel, so the main channel will not be closed on exception
490490 $ channel = $ this ->createChannel ();
@@ -637,7 +637,7 @@ protected function getDelayQueueArguments(string $destination, int $ttl): array
637637 /**
638638 * Get the exchange name, or empty string; as default value.
639639 */
640- protected function getExchange (string $ exchange = null ): string
640+ protected function getExchange (? string $ exchange = null ): string
641641 {
642642 return $ exchange ?? $ this ->getConfig ()->getExchange ();
643643 }
@@ -654,7 +654,7 @@ protected function getRoutingKey(string $destination): string
654654 /**
655655 * Get the exchangeType, or AMQPExchangeType::DIRECT as default.
656656 */
657- protected function getExchangeType (string $ type = null ): string
657+ protected function getExchangeType (? string $ type = null ): string
658658 {
659659 $ constant = AMQPExchangeType::class.':: ' .Str::upper ($ type ?: $ this ->getConfig ()->getExchangeType ());
660660
@@ -664,7 +664,7 @@ protected function getExchangeType(string $type = null): string
664664 /**
665665 * Get the exchange for failed messages.
666666 */
667- protected function getFailedExchange (string $ exchange = null ): string
667+ protected function getFailedExchange (? string $ exchange = null ): string
668668 {
669669 return $ exchange ?? $ this ->getConfig ()->getFailedExchange ();
670670 }
@@ -699,7 +699,7 @@ protected function isQueueDeclared(string $name): bool
699699 *
700700 * @throws AMQPProtocolChannelException
701701 */
702- protected function declareDestination (string $ destination , string $ exchange = null , string $ exchangeType = AMQPExchangeType::DIRECT ): void
702+ protected function declareDestination (string $ destination , ? string $ exchange = null , string $ exchangeType = AMQPExchangeType::DIRECT ): void
703703 {
704704 // When an exchange is provided and no exchange is present in RabbitMQ, create an exchange.
705705 if ($ exchange && ! $ this ->isExchangeExists ($ exchange )) {
0 commit comments