From 4621491f0084c0cf7141f0d3f957bad329106061 Mon Sep 17 00:00:00 2001 From: Maxim Smakouz Date: Tue, 2 Apr 2024 15:25:33 +0300 Subject: [PATCH] Fix Psalm issues (#63) --- src/Queue/AMQPCreateInfo.php | 2 +- src/Queue/SQSCreateInfo.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Queue/AMQPCreateInfo.php b/src/Queue/AMQPCreateInfo.php index 52cdf5f..e55f2a1 100644 --- a/src/Queue/AMQPCreateInfo.php +++ b/src/Queue/AMQPCreateInfo.php @@ -89,7 +89,7 @@ public function toArray(): array 'redial_timeout' => $this->redialTimeout, ]); - if (!empty($this->consumerId)) { + if ($this->consumerId !== null && $this->consumerId !== '') { $result['consumer_id'] = $this->consumerId; } diff --git a/src/Queue/SQSCreateInfo.php b/src/Queue/SQSCreateInfo.php index d6e4ddc..2f891f6 100644 --- a/src/Queue/SQSCreateInfo.php +++ b/src/Queue/SQSCreateInfo.php @@ -85,7 +85,7 @@ public function toArray(): array if ($this->tags !== []) { $result['tags'] = $this->tags; } - if (!empty($this->messageGroupId)) { + if ($this->messageGroupId !== null && $this->messageGroupId !== '') { $result['message_group_id'] = $this->messageGroupId; }