Skip to content

Commit

Permalink
Merge branch 'feature/php-tokenizer-add-missing-verbose-msg' of https…
Browse files Browse the repository at this point in the history
  • Loading branch information
gsherwood committed Mar 16, 2020
2 parents 2914011 + ec17d53 commit cf81a2c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Tokenizers/PHP.php
Original file line number Diff line number Diff line change
Expand Up @@ -1945,6 +1945,12 @@ protected function processAdditional()

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

$this->tokens[$i]['code'] = T_STRING;
$this->tokens[$i]['type'] = 'T_STRING';
}
Expand Down

0 comments on commit cf81a2c

Please sign in to comment.