Skip to content

Commit c1d30ce

Browse files
committed
Made debug output for arrow functions clearer (ref #2523)
1 parent 5b42dc7 commit c1d30ce

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Tokenizers/PHP.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1692,7 +1692,7 @@ protected function processAdditional()
16921692
if ($scopeCloser !== $numTokens) {
16931693
if (PHP_CODESNIFFER_VERBOSITY > 1) {
16941694
$line = $this->tokens[$i]['line'];
1695-
echo "\t* token $i on line $line processed as arrow function".PHP_EOL;
1695+
echo "\t=> token $i on line $line processed as arrow function".PHP_EOL;
16961696
}
16971697

16981698
$this->tokens[$i]['code'] = T_FN;
@@ -1718,6 +1718,11 @@ protected function processAdditional()
17181718
$closer = $this->tokens[$i]['parenthesis_closer'];
17191719
$this->tokens[$opener]['parenthesis_owner'] = $i;
17201720
$this->tokens[$closer]['parenthesis_owner'] = $i;
1721+
1722+
if (PHP_CODESNIFFER_VERBOSITY > 1) {
1723+
$line = $this->tokens[$arrow]['line'];
1724+
echo "\t\t* token $arrow on line $line changed from T_DOUBLE_ARROW to T_FN_ARROW".PHP_EOL;
1725+
}
17211726
}//end if
17221727
}//end if
17231728
}//end if

0 commit comments

Comments
 (0)