Skip to content

Commit

Permalink
fix use token as array on FollowedByCommaAnalyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Nov 19, 2024
1 parent 767b4d5 commit c05b162
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rules/DowngradePhp73/Tokenizer/FollowedByCommaAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ public function isFollowed(File $file, Node $node): bool
$currentToken = $oldTokens[$nextTokenPosition];

// only space
if (is_array($currentToken) || StringUtils::isMatch($currentToken, '#\s+#')) {
if (StringUtils::isMatch((string) $currentToken, '#\s+#')) {
++$nextTokenPosition;
continue;
}

// without comma
if (in_array($currentToken, ['(', ')', ';'], true)) {
if (in_array((string) $currentToken, ['(', ')', ';'], true)) {
return false;
}

Expand Down

0 comments on commit c05b162

Please sign in to comment.