diff --git a/rules/Php81/Rector/Array_/ArrayToFirstClassCallableRector.php b/rules/Php81/Rector/Array_/ArrayToFirstClassCallableRector.php index 88dae554450..75f043919ee 100644 --- a/rules/Php81/Rector/Array_/ArrayToFirstClassCallableRector.php +++ b/rules/Php81/Rector/Array_/ArrayToFirstClassCallableRector.php @@ -98,6 +98,10 @@ public function refactor(Node $node): StaticCall|MethodCall|null return null; } + if ($node->getAttribute(AttributeKey::IS_ARRAY_IN_ATTRIBUTE) === true) { + return null; + } + $scope = ScopeFetcher::fetch($node); $arrayCallable = $this->arrayCallableMethodMatcher->match($node, $scope);