diff --git a/pkg/stomp/StompProducer.php b/pkg/stomp/StompProducer.php index c275bd6a3..8c1933ee4 100644 --- a/pkg/stomp/StompProducer.php +++ b/pkg/stomp/StompProducer.php @@ -20,9 +20,6 @@ class StompProducer implements Producer */ private $stomp; - /** - * @param Client $stomp - */ public function __construct(Client $stomp) { $this->stomp = $stomp; @@ -45,9 +42,12 @@ public function send(Destination $destination, Message $message): void $this->stomp->send($destination->getQueueName(), $stompMessage); } + /** + * @return $this|Producer + */ public function setDeliveryDelay(int $deliveryDelay = null): Producer { - if (null === $deliveryDelay) { + if (empty($deliveryDelay)) { return $this; } @@ -59,9 +59,14 @@ public function getDeliveryDelay(): ?int return null; } + /** + * @throws PriorityNotSupportedException + * + * @return $this|Producer + */ public function setPriority(int $priority = null): Producer { - if (null === $priority) { + if (empty($priority)) { return $this; } @@ -73,9 +78,12 @@ public function getPriority(): ?int return null; } + /** + * @return $this|Producer + */ public function setTimeToLive(int $timeToLive = null): Producer { - if (null === $timeToLive) { + if (empty($timeToLive)) { return $this; }