Skip to content

Commit

Permalink
fix use Token as array
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Nov 19, 2024
1 parent c1ba474 commit 767b4d5
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ private function isBetweenParentheses(Node $node): bool
$token = $oldTokens[$previousTokenPos] ?? null;
--$previousTokenPos;

if (! isset($token[0])) {
return $token === '(';
if ((string) $token === '(') {
return true;
}

if (! in_array($token[0], [\T_COMMENT, \T_WHITESPACE], true)) {
return $token === '(';
if (! in_array((string) $token, [\T_COMMENT, \T_WHITESPACE], true)) {
continue;
}
}

Expand Down

0 comments on commit 767b4d5

Please sign in to comment.