| @@ 1323-1328 (lines=6) @@ | ||
| 1320 | $closer = $this->tokens[$i]['bracket_closer']; |
|
| 1321 | $this->tokens[$closer]['code'] = T_CLOSE_SHORT_ARRAY; |
|
| 1322 | $this->tokens[$closer]['type'] = 'T_CLOSE_SHORT_ARRAY'; |
|
| 1323 | if (PHP_CodeSniffer_VERBOSITY > 1) { |
|
| 1324 | $line = $this->tokens[$i]['line']; |
|
| 1325 | echo "\t* token $i on line $line changed from T_OPEN_SQUARE_BRACKET to T_OPEN_SHORT_ARRAY".PHP_EOL; |
|
| 1326 | $line = $this->tokens[$closer]['line']; |
|
| 1327 | echo "\t* token $closer on line $line changed from T_CLOSE_SQUARE_BRACKET to T_CLOSE_SHORT_ARRAY".PHP_EOL; |
|
| 1328 | } |
|
| 1329 | } |
|
| 1330 | ||
| 1331 | continue; |
|
| @@ 678-683 (lines=6) @@ | ||
| 675 | $opener, |
|
| 676 | ); |
|
| 677 | ||
| 678 | if (PHP_CodeSniffer_VERBOSITY > 1) { |
|
| 679 | $type = $this->tokens[$stackPtr]['type']; |
|
| 680 | $closerType = $this->tokens[$scopeCloser]['type']; |
|
| 681 | echo str_repeat("\t", $depth); |
|
| 682 | echo "=> Found scope closer ($scopeCloser:$closerType) for $stackPtr:$type".PHP_EOL; |
|
| 683 | } |
|
| 684 | ||
| 685 | $validCloser = true; |
|
| 686 | if (($this->tokens[$stackPtr]['code'] === T_IF || $this->tokens[$stackPtr]['code'] === T_ELSEIF) |
|
| @@ 989-994 (lines=6) @@ | ||
| 986 | && isset(Util\Tokens::$emptyTokens[$this->tokens[($i - 1)]['code']]) === false |
|
| 987 | ) { |
|
| 988 | if ($this->scopeOpeners[$currType]['strict'] === true) { |
|
| 989 | if (PHP_CodeSniffer_VERBOSITY > 1) { |
|
| 990 | $type = $this->tokens[$stackPtr]['type']; |
|
| 991 | $lines = ($this->tokens[$i]['line'] - $startLine); |
|
| 992 | echo str_repeat("\t", $depth); |
|
| 993 | echo "=> Still looking for $stackPtr:$type scope opener after $lines lines".PHP_EOL; |
|
| 994 | } |
|
| 995 | } else { |
|
| 996 | if (PHP_CodeSniffer_VERBOSITY > 1) { |
|
| 997 | $type = $this->tokens[$stackPtr]['type']; |
|
| @@ 1027-1033 (lines=7) @@ | ||
| 1024 | $classStack = array(); |
|
| 1025 | ||
| 1026 | for ($i = 0; $i < $numTokens; $i++) { |
|
| 1027 | if (PHP_CodeSniffer_VERBOSITY > 1) { |
|
| 1028 | $type = $this->tokens[$i]['type']; |
|
| 1029 | $content = Util\Common::prepareForOutput($this->tokens[$i]['content']); |
|
| 1030 | ||
| 1031 | echo str_repeat("\t", count($classStack)); |
|
| 1032 | echo "\tProcess token $i: $type => $content".PHP_EOL; |
|
| 1033 | } |
|
| 1034 | ||
| 1035 | // Looking for functions that are actually closures. |
|
| 1036 | if ($this->tokens[$i]['code'] === T_FUNCTION && isset($this->tokens[$i]['scope_opener']) === true) { |
|