From 2c99b96193d744ce7bc8598ad03a1ed1759f75ea Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Sat, 26 Jul 2025 11:38:52 +0200 Subject: [PATCH] Use `Type->isInteger()` over `$dimType instanceof ConstantIntegerType` --- src/Analyser/MutatingScope.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Analyser/MutatingScope.php b/src/Analyser/MutatingScope.php index 395626e1ce..e4e92d074e 100644 --- a/src/Analyser/MutatingScope.php +++ b/src/Analyser/MutatingScope.php @@ -4238,7 +4238,7 @@ public function specifyExpressionType(Expr $expr, Type $type, Type $nativeType, new ObjectType(ArrayAccess::class), new NullType(), ]; - if ($dimType instanceof ConstantIntegerType) { + if ($dimType->isInteger()->yes()) { $types[] = new StringType(); }