@@ -204,7 +204,7 @@ protected function publishBatch($jobs, $data = '', $queue = null): void
204
204
/**
205
205
* @throws AMQPProtocolChannelException
206
206
*/
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
208
208
{
209
209
[$ destination , $ exchange , $ exchangeType , $ attempts ] = $ this ->publishProperties ($ queue , $ options );
210
210
@@ -397,7 +397,7 @@ public function deleteExchange(string $name, bool $unused = false): void
397
397
*
398
398
* @throws AMQPProtocolChannelException
399
399
*/
400
- public function isQueueExists (string $ name = null ): bool
400
+ public function isQueueExists (? string $ name = null ): bool
401
401
{
402
402
$ queueName = $ this ->getQueue ($ name );
403
403
@@ -484,7 +484,7 @@ public function bindQueue(string $queue, string $exchange, string $routingKey =
484
484
/**
485
485
* Purge the queue of messages.
486
486
*/
487
- public function purge (string $ queue = null ): void
487
+ public function purge (? string $ queue = null ): void
488
488
{
489
489
// create a temporary channel, so the main channel will not be closed on exception
490
490
$ channel = $ this ->createChannel ();
@@ -637,7 +637,7 @@ protected function getDelayQueueArguments(string $destination, int $ttl): array
637
637
/**
638
638
* Get the exchange name, or empty string; as default value.
639
639
*/
640
- protected function getExchange (string $ exchange = null ): string
640
+ protected function getExchange (? string $ exchange = null ): string
641
641
{
642
642
return $ exchange ?? $ this ->getConfig ()->getExchange ();
643
643
}
@@ -654,7 +654,7 @@ protected function getRoutingKey(string $destination): string
654
654
/**
655
655
* Get the exchangeType, or AMQPExchangeType::DIRECT as default.
656
656
*/
657
- protected function getExchangeType (string $ type = null ): string
657
+ protected function getExchangeType (? string $ type = null ): string
658
658
{
659
659
$ constant = AMQPExchangeType::class.':: ' .Str::upper ($ type ?: $ this ->getConfig ()->getExchangeType ());
660
660
@@ -664,7 +664,7 @@ protected function getExchangeType(string $type = null): string
664
664
/**
665
665
* Get the exchange for failed messages.
666
666
*/
667
- protected function getFailedExchange (string $ exchange = null ): string
667
+ protected function getFailedExchange (? string $ exchange = null ): string
668
668
{
669
669
return $ exchange ?? $ this ->getConfig ()->getFailedExchange ();
670
670
}
@@ -699,7 +699,7 @@ protected function isQueueDeclared(string $name): bool
699
699
*
700
700
* @throws AMQPProtocolChannelException
701
701
*/
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
703
703
{
704
704
// When an exchange is provided and no exchange is present in RabbitMQ, create an exchange.
705
705
if ($ exchange && ! $ this ->isExchangeExists ($ exchange )) {
0 commit comments