| @@ 773-782 (lines=10) @@ | ||
| 770 | echo "=> Found function before scope opener for $stackPtr:$type, processing manually".PHP_EOL; |
|
| 771 | } |
|
| 772 | ||
| 773 | if (isset($this->tokens[$i]['scope_closer']) === true) { |
|
| 774 | // We've already processed this closure. |
|
| 775 | if (PHP_CodeSniffer_VERBOSITY > 1) { |
|
| 776 | echo str_repeat("\t", $depth); |
|
| 777 | echo '* already processed, skipping *'.PHP_EOL; |
|
| 778 | } |
|
| 779 | ||
| 780 | $i = $this->tokens[$i]['scope_closer']; |
|
| 781 | continue; |
|
| 782 | } |
|
| 783 | ||
| 784 | $i = self::recurseScopeMap($i, ($depth + 1), $ignore); |
|
| 785 | continue; |
|
| @@ 913-929 (lines=17) @@ | ||
| 910 | for ($x = ($i - 1); $x > 0; $x--) { |
|
| 911 | if (isset(Util\Tokens::$emptyTokens[$this->tokens[$x]['code']]) === true) { |
|
| 912 | continue; |
|
| 913 | } else { |
|
| 914 | // If the first non-whitespace/comment token is a |
|
| 915 | // variable or object operator then this is an opener |
|
| 916 | // for a string offset and not a scope. |
|
| 917 | if ($this->tokens[$x]['code'] === T_VARIABLE |
|
| 918 | || $this->tokens[$x]['code'] === T_OBJECT_OPERATOR |
|
| 919 | ) { |
|
| 920 | if (PHP_CodeSniffer_VERBOSITY > 1) { |
|
| 921 | echo str_repeat("\t", $depth); |
|
| 922 | echo '* ignoring curly brace *'.PHP_EOL; |
|
| 923 | } |
|
| 924 | ||
| 925 | $ignore++; |
|
| 926 | }//end if |
|
| 927 | ||
| 928 | break; |
|
| 929 | }//end if |
|
| 930 | }//end for |
|
| 931 | }//end if |
|
| 932 | }//end if |
|