From ba5374e6c4aa99114e3c9c65815fefb910a50eab Mon Sep 17 00:00:00 2001 From: James Read Date: Wed, 15 Jan 2025 22:51:32 +0000 Subject: [PATCH] Running php-cs-fixer Running php-cs-fixer to fix CS drift --- NullMessage.php | 8 ++++---- NullProducer.php | 6 +++--- Tests/Spec/NullMessageTest.php | 3 --- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/NullMessage.php b/NullMessage.php index bd48a38..93fc57c 100644 --- a/NullMessage.php +++ b/NullMessage.php @@ -97,7 +97,7 @@ public function setRedelivered(bool $redelivered): void $this->redelivered = $redelivered; } - public function setCorrelationId(string $correlationId = null): void + public function setCorrelationId(?string $correlationId = null): void { $headers = $this->getHeaders(); $headers['correlation_id'] = (string) $correlationId; @@ -110,7 +110,7 @@ public function getCorrelationId(): ?string return $this->getHeader('correlation_id'); } - public function setMessageId(string $messageId = null): void + public function setMessageId(?string $messageId = null): void { $headers = $this->getHeaders(); $headers['message_id'] = (string) $messageId; @@ -130,7 +130,7 @@ public function getTimestamp(): ?int return null === $value ? null : (int) $value; } - public function setTimestamp(int $timestamp = null): void + public function setTimestamp(?int $timestamp = null): void { $headers = $this->getHeaders(); $headers['timestamp'] = (int) $timestamp; @@ -138,7 +138,7 @@ public function setTimestamp(int $timestamp = null): void $this->setHeaders($headers); } - public function setReplyTo(string $replyTo = null): void + public function setReplyTo(?string $replyTo = null): void { $this->setHeader('reply_to', $replyTo); } diff --git a/NullProducer.php b/NullProducer.php index 47235e7..1349de9 100644 --- a/NullProducer.php +++ b/NullProducer.php @@ -23,7 +23,7 @@ public function send(Destination $destination, Message $message): void /** * @return NullProducer */ - public function setDeliveryDelay(int $deliveryDelay = null): Producer + public function setDeliveryDelay(?int $deliveryDelay = null): Producer { $this->deliveryDelay = $deliveryDelay; @@ -38,7 +38,7 @@ public function getDeliveryDelay(): ?int /** * @return NullProducer */ - public function setPriority(int $priority = null): Producer + public function setPriority(?int $priority = null): Producer { $this->priority = $priority; @@ -53,7 +53,7 @@ public function getPriority(): ?int /** * @return NullProducer */ - public function setTimeToLive(int $timeToLive = null): Producer + public function setTimeToLive(?int $timeToLive = null): Producer { $this->timeToLive = $timeToLive; diff --git a/Tests/Spec/NullMessageTest.php b/Tests/Spec/NullMessageTest.php index 34c6863..6bacc92 100644 --- a/Tests/Spec/NullMessageTest.php +++ b/Tests/Spec/NullMessageTest.php @@ -7,9 +7,6 @@ class NullMessageTest extends MessageSpec { - /** - * {@inheritdoc} - */ protected function createMessage() { return new NullMessage();