@@ 301-304 (lines=4) @@ | ||
298 | } |
|
299 | ||
300 | $this->setConfigData((string) $config['name'], (string) $config['value'], true); |
|
301 | if (PHP_CodeSniffer_VERBOSITY > 1) { |
|
302 | echo str_repeat("\t", $depth); |
|
303 | echo "\t=> set config value ".(string) $config['name'].': '.(string) $config['value'].PHP_EOL; |
|
304 | } |
|
305 | } |
|
306 | ||
307 | foreach ($ruleset->rule as $rule) { |
|
@@ 314-317 (lines=4) @@ | ||
311 | continue; |
|
312 | } |
|
313 | ||
314 | if (PHP_CodeSniffer_VERBOSITY > 1) { |
|
315 | echo str_repeat("\t", $depth); |
|
316 | echo "\tProcessing rule \"".$rule['ref'].'"'.PHP_EOL; |
|
317 | } |
|
318 | ||
319 | $expandedSniffs = $this->expandRulesetReference($rule['ref'], $rulesetDir, $depth); |
|
320 | $newSniffs = array_diff($expandedSniffs, $includedSniffs); |
|
@@ 344-347 (lines=4) @@ | ||
341 | // the sniff, except this one. |
|
342 | $this->ruleset[$sniffCode]['severity'] = 0; |
|
343 | $this->ruleset[(string) $rule['ref']]['severity'] = 5; |
|
344 | if (PHP_CodeSniffer_VERBOSITY > 1) { |
|
345 | echo str_repeat("\t", $depth); |
|
346 | echo "\t\tExcluding sniff \"".$sniffCode.'" except for "'.$parts[3].'"'.PHP_EOL; |
|
347 | } |
|
348 | }//end if |
|
349 | }//end if |
|
350 | ||
@@ 357-360 (lines=4) @@ | ||
354 | continue; |
|
355 | } |
|
356 | ||
357 | if (PHP_CodeSniffer_VERBOSITY > 1) { |
|
358 | echo str_repeat("\t", $depth); |
|
359 | echo "\t\tExcluding rule \"".$exclude['name'].'"'.PHP_EOL; |
|
360 | } |
|
361 | ||
362 | // Check if a single code is being excluded, which is a shortcut |
|
363 | // for setting the severity of the message to 0. |
|
@@ 468-471 (lines=4) @@ | ||
465 | } |
|
466 | ||
467 | $this->ignorePatterns[(string) $pattern] = (string) $pattern['type']; |
|
468 | if (PHP_CodeSniffer_VERBOSITY > 1) { |
|
469 | echo str_repeat("\t", $depth); |
|
470 | echo "\t=> added global ".(string) $pattern['type'].' ignore pattern: '.(string) $pattern.PHP_EOL; |
|
471 | } |
|
472 | } |
|
473 | ||
474 | $includedSniffs = array_unique(array_merge($ownSniffs, $includedSniffs)); |