Skip to content

Commit d570825

Browse files
committed
Tokenizer/PHP: minor tweak
Prevents some unnecessary token changes of the type `token 4 changed from T_STRING to T_STRING`.
1 parent 2da6904 commit d570825

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Tokenizers/PHP.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1469,6 +1469,7 @@ protected function tokenize($string)
14691469

14701470
if ($x < $numTokens
14711471
&& is_array($tokens[$x]) === true
1472+
&& $tokens[$x][0] !== T_STRING
14721473
&& $tokens[$x][0] !== T_NAME_QUALIFIED
14731474
) {
14741475
if (PHP_CODESNIFFER_VERBOSITY > 1) {

0 commit comments

Comments
 (0)