Skip to content

Commit cf81a2c

Browse files
committed
Merge branch 'feature/php-tokenizer-add-missing-verbose-msg' of https://github.com/jrfnl/PHP_CodeSniffer
2 parents 2914011 + ec17d53 commit cf81a2c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Tokenizers/PHP.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1945,6 +1945,12 @@ protected function processAdditional()
19451945

19461946
// If after all that, the extra tokens are not set, this is not an arrow function.
19471947
if (isset($this->tokens[$i]['scope_closer']) === false) {
1948+
if (PHP_CODESNIFFER_VERBOSITY > 1) {
1949+
$line = $this->tokens[$i]['line'];
1950+
$oldCode = $this->tokens[$i]['code'];
1951+
echo "\t\t* token $i on line $line changed from $oldCode to T_STRING: not an arrow function after all".PHP_EOL;
1952+
}
1953+
19481954
$this->tokens[$i]['code'] = T_STRING;
19491955
$this->tokens[$i]['type'] = 'T_STRING';
19501956
}

0 commit comments

Comments
 (0)