Skip to content

Commit 022df18

Browse files
committed
[ci-review] Rector Rectify
1 parent 6b94299 commit 022df18

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rules/TypeDeclaration/Rector/FuncCall/AddArrowFunctionParamArrayWhereDimFetchRector.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace Rector\TypeDeclaration\Rector\FuncCall;
66

7+
use PhpParser\Node\Scalar\String_;
78
use PhpParser\Node;
89
use PhpParser\Node\Expr\ArrayDimFetch;
910
use PhpParser\Node\Expr\ArrowFunction;
@@ -149,7 +150,7 @@ private function resolveDimFetchVariableNames(Closure|ArrowFunction $closureExpr
149150
$type = $this->nodeTypeResolver->getNativeType($arrayDimFetch->var);
150151

151152
// skip string values
152-
if (! $arrayDimFetch->dim instanceof Node\Scalar\String_ && ($type->isString()->yes() || $type->isString()->maybe())) {
153+
if (! $arrayDimFetch->dim instanceof String_ && ($type->isString()->yes() || $type->isString()->maybe())) {
153154
continue;
154155
}
155156

0 commit comments

Comments
 (0)