| @@ 332-337 (lines=6) @@ | ||
| 329 | // This sniff code has already been turned off, but now |
|
| 330 | // it is being explicitly included again, so turn it back on. |
|
| 331 | $this->ruleset[(string) $rule['ref']]['severity'] = 5; |
|
| 332 | if (PHP_CodeSniffer_VERBOSITY > 1) { |
|
| 333 | echo str_repeat("\t", $depth); |
|
| 334 | echo "\t\t* disabling sniff exclusion for specific message code *".PHP_EOL; |
|
| 335 | echo str_repeat("\t", $depth); |
|
| 336 | echo "\t\t=> severity set to 5".PHP_EOL; |
|
| 337 | } |
|
| 338 | } else if (empty($newSniffs) === false) { |
|
| 339 | // Including a sniff that hasn't been included higher up, but |
|
| 340 | // only including a single message from it. So turn off all messages in |
|
| @@ 695-700 (lines=6) @@ | ||
| 692 | return $this->processRuleset($ref.DIRECTORY_SEPARATOR.'ruleset.xml', ($depth + 2)); |
|
| 693 | } else { |
|
| 694 | // We are referencing a whole directory of sniffs. |
|
| 695 | if (PHP_CodeSniffer_VERBOSITY > 1) { |
|
| 696 | echo str_repeat("\t", $depth); |
|
| 697 | echo "\t\t* rule is referencing a directory of sniffs *".PHP_EOL; |
|
| 698 | echo str_repeat("\t", $depth); |
|
| 699 | echo "\t\tAdding sniff files from directory".PHP_EOL; |
|
| 700 | } |
|
| 701 | ||
| 702 | return $this->expandSniffDirectory($ref, ($depth + 1)); |
|
| 703 | } |
|
| @@ 1146-1149 (lines=4) @@ | ||
| 1143 | unset($openers[$lastOpener]); |
|
| 1144 | ||
| 1145 | $level--; |
|
| 1146 | if (PHP_CodeSniffer_VERBOSITY > 1) { |
|
| 1147 | echo str_repeat("\t", ($level + 2)); |
|
| 1148 | echo '* level decreased *'.PHP_EOL; |
|
| 1149 | } |
|
| 1150 | }//end if |
|
| 1151 | }//end if |
|
| 1152 | ||
| @@ 1154-1157 (lines=4) @@ | ||
| 1151 | }//end if |
|
| 1152 | ||
| 1153 | $level++; |
|
| 1154 | if (PHP_CodeSniffer_VERBOSITY > 1) { |
|
| 1155 | echo str_repeat("\t", ($level + 1)); |
|
| 1156 | echo '* level increased *'.PHP_EOL; |
|
| 1157 | } |
|
| 1158 | ||
| 1159 | $conditions[$stackPtr] = $this->tokens[$stackPtr]['code']; |
|
| 1160 | if (PHP_CodeSniffer_VERBOSITY > 1) { |
|
| @@ 1188-1191 (lines=4) @@ | ||
| 1185 | } |
|
| 1186 | ||
| 1187 | $oldCondition = array_pop($conditions); |
|
| 1188 | if (PHP_CodeSniffer_VERBOSITY > 1) { |
|
| 1189 | echo str_repeat("\t", ($level + 1)); |
|
| 1190 | echo '* token '.token_name($oldCondition).' removed from conditions array *'.PHP_EOL; |
|
| 1191 | } |
|
| 1192 | ||
| 1193 | // Make sure this closer actually belongs to us. |
|
| 1194 | // Either the condition also has to think this is the |
|
| @@ 1241-1244 (lines=4) @@ | ||
| 1238 | }//end if |
|
| 1239 | ||
| 1240 | $level--; |
|
| 1241 | if (PHP_CodeSniffer_VERBOSITY > 1) { |
|
| 1242 | echo str_repeat("\t", ($level + 2)); |
|
| 1243 | echo '* level decreased *'.PHP_EOL; |
|
| 1244 | } |
|
| 1245 | ||
| 1246 | $this->tokens[$i]['level'] = $level; |
|
| 1247 | $this->tokens[$i]['conditions'] = $conditions; |
|