| @@ 383-387 (lines=5) @@ | ||
| 380 | case T_OPEN_SQUARE_BRACKET: |
|
| 381 | $squareOpeners[] = $i; |
|
| 382 | ||
| 383 | if (PHP_CodeSniffer_VERBOSITY > 1) { |
|
| 384 | echo str_repeat("\t", count($squareOpeners)); |
|
| 385 | echo str_repeat("\t", count($curlyOpeners)); |
|
| 386 | echo "=> Found square bracket opener at $i".PHP_EOL; |
|
| 387 | } |
|
| 388 | break; |
|
| 389 | case T_OPEN_CURLY_BRACKET: |
|
| 390 | if (isset($this->tokens[$i]['scope_closer']) === false) { |
|
| @@ 393-397 (lines=5) @@ | ||
| 390 | if (isset($this->tokens[$i]['scope_closer']) === false) { |
|
| 391 | $curlyOpeners[] = $i; |
|
| 392 | ||
| 393 | if (PHP_CodeSniffer_VERBOSITY > 1) { |
|
| 394 | echo str_repeat("\t", count($squareOpeners)); |
|
| 395 | echo str_repeat("\t", count($curlyOpeners)); |
|
| 396 | echo "=> Found curly bracket opener at $i".PHP_EOL; |
|
| 397 | } |
|
| 398 | } |
|
| 399 | break; |
|
| 400 | case T_CLOSE_SQUARE_BRACKET: |
|
| @@ 408-412 (lines=5) @@ | ||
| 405 | $this->tokens[$opener]['bracket_opener'] = $opener; |
|
| 406 | $this->tokens[$opener]['bracket_closer'] = $i; |
|
| 407 | ||
| 408 | if (PHP_CodeSniffer_VERBOSITY > 1) { |
|
| 409 | echo str_repeat("\t", count($squareOpeners)); |
|
| 410 | echo str_repeat("\t", count($curlyOpeners)); |
|
| 411 | echo "\t=> Found square bracket closer at $i for $opener".PHP_EOL; |
|
| 412 | } |
|
| 413 | } |
|
| 414 | break; |
|
| 415 | case T_CLOSE_CURLY_BRACKET: |
|
| @@ 425-429 (lines=5) @@ | ||
| 422 | $this->tokens[$opener]['bracket_opener'] = $opener; |
|
| 423 | $this->tokens[$opener]['bracket_closer'] = $i; |
|
| 424 | ||
| 425 | if (PHP_CodeSniffer_VERBOSITY > 1) { |
|
| 426 | echo str_repeat("\t", count($squareOpeners)); |
|
| 427 | echo str_repeat("\t", count($curlyOpeners)); |
|
| 428 | echo "\t=> Found curly bracket closer at $i for $opener".PHP_EOL; |
|
| 429 | } |
|
| 430 | } |
|
| 431 | break; |
|
| 432 | default: |
|