Skip to content

Commit 767b4d5

Browse files
committed
fix use Token as array
1 parent c1ba474 commit 767b4d5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

rules/DowngradePhp80/Rector/New_/DowngradeArbitraryExpressionsSupportRector.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,12 @@ private function isBetweenParentheses(Node $node): bool
109109
$token = $oldTokens[$previousTokenPos] ?? null;
110110
--$previousTokenPos;
111111

112-
if (! isset($token[0])) {
113-
return $token === '(';
112+
if ((string) $token === '(') {
113+
return true;
114114
}
115115

116-
if (! in_array($token[0], [\T_COMMENT, \T_WHITESPACE], true)) {
117-
return $token === '(';
116+
if (! in_array((string) $token, [\T_COMMENT, \T_WHITESPACE], true)) {
117+
continue;
118118
}
119119
}
120120

0 commit comments

Comments
 (0)