Skip to content

Commit

Permalink
test for PHPMD or PMD only
Browse files Browse the repository at this point in the history
  • Loading branch information
juliangut committed Nov 4, 2016
1 parent c51ea72 commit 147beb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/php/PHPMD/Node/Annotation.php
Expand Up @@ -107,7 +107,7 @@ private function isSuppressed(Rule $rule)
{ {
if (in_array($this->value, array('PHPMD', 'PMD'))) { if (in_array($this->value, array('PHPMD', 'PMD'))) {
return true; return true;
} elseif (strpos($this->value, 'PMD.' . $rule->getName()) !== false) { } elseif (preg_match('/^(PH)?PMD\.' . $rule->getName() . '/', $this->value)) {
return true; return true;
} }
return (stripos($rule->getName(), $this->value) !== false); return (stripos($rule->getName(), $this->value) !== false);
Expand Down

0 comments on commit 147beb1

Please sign in to comment.