From ab93b5fae6ef2cc336942e9446bc90ca2fd0f919 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Mon, 2 Dec 2024 23:43:45 +0100 Subject: [PATCH] fix phpstan --- src/util/Loop.php | 2 +- tests/mutex/PHPRedisMutexTest.php | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/util/Loop.php b/src/util/Loop.php index b8023cbc..f48eb5f9 100644 --- a/src/util/Loop.php +++ b/src/util/Loop.php @@ -94,7 +94,7 @@ public function execute(callable $code) $deadline = microtime(true) + $this->timeout; $result = null; - for ($i = 0; $this->looping && microtime(true) < $deadline; ++$i) { + for ($i = 0; $this->looping && microtime(true) < $deadline; ++$i) { // @phpstan-ignore-line $result = $code(); if (!$this->looping) { // @phpstan-ignore-line /* diff --git a/tests/mutex/PHPRedisMutexTest.php b/tests/mutex/PHPRedisMutexTest.php index e5683eff..59e739c9 100644 --- a/tests/mutex/PHPRedisMutexTest.php +++ b/tests/mutex/PHPRedisMutexTest.php @@ -11,13 +11,11 @@ if (PHP_MAJOR_VERSION >= 8) { trait RedisTestTrait { - #[\Override] public function eval($script, $args = [], $numKeys = 0): mixed { return $this->_eval($script, $args, $numKeys); } - #[\Override] public function set($key, $value, $options = null): /* Redis|string| */ bool { return $this->_set($key, $value, $options); @@ -29,7 +27,6 @@ trait RedisTestTrait /** * @return mixed */ - #[\Override] public function eval($script, $args = [], $numKeys = 0) { return $this->_eval($script, $args, $numKeys); @@ -38,7 +35,6 @@ public function eval($script, $args = [], $numKeys = 0) /** * @return Redis|string|bool */ - #[\Override] public function set($key, $value, $options = null) { return $this->_set($key, $value, $options);