| @@ 744-753 (lines=10) @@ | ||
| 741 | echo "=> Found function before scope opener for $stackPtr:$type, processing manually".PHP_EOL; |
|
| 742 | } |
|
| 743 | ||
| 744 | if (isset($this->tokens[$i]['scope_closer']) === true) { |
|
| 745 | // We've already processed this closure. |
|
| 746 | if (PHP_CodeSniffer_VERBOSITY > 1) { |
|
| 747 | echo str_repeat("\t", $depth); |
|
| 748 | echo '* already processed, skipping *'.PHP_EOL; |
|
| 749 | } |
|
| 750 | ||
| 751 | $i = $this->tokens[$i]['scope_closer']; |
|
| 752 | continue; |
|
| 753 | } |
|
| 754 | ||
| 755 | $i = self::recurseScopeMap($i, ($depth + 1), $ignore); |
|
| 756 | continue; |
|
| @@ 884-900 (lines=17) @@ | ||
| 881 | for ($x = ($i - 1); $x > 0; $x--) { |
|
| 882 | if (isset(Util\Tokens::$emptyTokens[$this->tokens[$x]['code']]) === true) { |
|
| 883 | continue; |
|
| 884 | } else { |
|
| 885 | // If the first non-whitespace/comment token is a |
|
| 886 | // variable or object operator then this is an opener |
|
| 887 | // for a string offset and not a scope. |
|
| 888 | if ($this->tokens[$x]['code'] === T_VARIABLE |
|
| 889 | || $this->tokens[$x]['code'] === T_OBJECT_OPERATOR |
|
| 890 | ) { |
|
| 891 | if (PHP_CodeSniffer_VERBOSITY > 1) { |
|
| 892 | echo str_repeat("\t", $depth); |
|
| 893 | echo '* ignoring curly brace *'.PHP_EOL; |
|
| 894 | } |
|
| 895 | ||
| 896 | $ignore++; |
|
| 897 | }//end if |
|
| 898 | ||
| 899 | break; |
|
| 900 | }//end if |
|
| 901 | }//end for |
|
| 902 | }//end if |
|
| 903 | }//end if |
|