Permalink
Browse files

test for PHPMD or PMD only

  • Loading branch information...
1 parent c51ea72 commit 147beb1952c1dd14d190c137e62dfa041945b060 @juliangut juliangut committed Nov 4, 2016
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/main/php/PHPMD/Node/Annotation.php
@@ -107,7 +107,7 @@ private function isSuppressed(Rule $rule)
{
if (in_array($this->value, array('PHPMD', 'PMD'))) {
return true;
- } elseif (strpos($this->value, 'PMD.' . $rule->getName()) !== false) {
+ } elseif (preg_match('/^(PH)?PMD\.' . $rule->getName() . '/', $this->value)) {
return true;
}
return (stripos($rule->getName(), $this->value) !== false);

0 comments on commit 147beb1

Please sign in to comment.