From 9a32ac96bbe917e880eff02995e7f3b967e97b5b Mon Sep 17 00:00:00 2001 From: Adrien Poupa Date: Wed, 14 Dec 2022 14:02:09 -0500 Subject: [PATCH] chore: fix PHP 8.1 deprecation notices --- composer.json | 2 +- src/Bernard/Queue/InMemoryQueue.php | 2 +- src/Bernard/Queue/PersistentQueue.php | 2 +- src/Bernard/QueueFactory/InMemoryFactory.php | 2 +- src/Bernard/QueueFactory/PersistentFactory.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index fceb5f49..33d01143 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,7 @@ }, "require" : { - "php" : ">=5.3.3" + "php" : "^7.0|^8.0" }, "replace" : { diff --git a/src/Bernard/Queue/InMemoryQueue.php b/src/Bernard/Queue/InMemoryQueue.php index 4920ab61..f14a0c8d 100644 --- a/src/Bernard/Queue/InMemoryQueue.php +++ b/src/Bernard/Queue/InMemoryQueue.php @@ -28,7 +28,7 @@ public function __construct($name) /** * {@inheritDoc} */ - public function count() + public function count(): int { $this->errorIfClosed(); diff --git a/src/Bernard/Queue/PersistentQueue.php b/src/Bernard/Queue/PersistentQueue.php index 428a6583..14e9ac9b 100644 --- a/src/Bernard/Queue/PersistentQueue.php +++ b/src/Bernard/Queue/PersistentQueue.php @@ -45,7 +45,7 @@ public function register() /** * {@inheritDoc} */ - public function count() + public function count(): int { $this->errorIfClosed(); diff --git a/src/Bernard/QueueFactory/InMemoryFactory.php b/src/Bernard/QueueFactory/InMemoryFactory.php index 68383f97..cf0d27b5 100644 --- a/src/Bernard/QueueFactory/InMemoryFactory.php +++ b/src/Bernard/QueueFactory/InMemoryFactory.php @@ -38,7 +38,7 @@ public function all() /** * @return integer */ - public function count() + public function count(): int { return count($this->queues); } diff --git a/src/Bernard/QueueFactory/PersistentFactory.php b/src/Bernard/QueueFactory/PersistentFactory.php index 09ff8582..addbe4f1 100644 --- a/src/Bernard/QueueFactory/PersistentFactory.php +++ b/src/Bernard/QueueFactory/PersistentFactory.php @@ -65,7 +65,7 @@ public function exists($queueName) /** * @return integer */ - public function count() + public function count(): int { return count($this->connection->listQueues()); }