From c6f4c4ceb7d7355ef761a6ffaa1b1574469789c6 Mon Sep 17 00:00:00 2001 From: Ondrej Mirtes Date: Tue, 18 Jul 2023 15:02:17 +0200 Subject: [PATCH] Fix PHP 8.3 deprecation --- src/Analyser/MutatingScope.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Analyser/MutatingScope.php b/src/Analyser/MutatingScope.php index 001dd74f7b..cc355ac82e 100644 --- a/src/Analyser/MutatingScope.php +++ b/src/Analyser/MutatingScope.php @@ -127,6 +127,7 @@ use function get_class; use function implode; use function in_array; +use function is_numeric; use function is_string; use function ltrim; use function sprintf; @@ -1420,7 +1421,7 @@ private function resolveType(string $exprString, Expr $node): Type foreach ($varScalars as $varValue) { if ($node instanceof Expr\PreInc) { ++$varValue; - } else { + } elseif (is_numeric($varValue)) { --$varValue; }