hasSuppressWarningsAnnotationFor() 공개 메소드

Checks if this node has a suppressed annotation for the given rule instance.
public hasSuppressWarningsAnnotationFor ( PHPMD\Rule $rule ) : boolean
$rule PHPMD\Rule
리턴 boolean
예제 #1
0
 /**
  * Returns <b>true</b> when the given method should be used for this rule's
  * analysis.
  *
  * @param \PHPMD\Node\ClassNode $class
  * @param \PHPMD\Node\MethodNode $method
  * @return boolean
  */
 private function acceptMethod(ClassNode $class, MethodNode $method)
 {
     return $method->isPrivate() && false === $method->hasSuppressWarningsAnnotationFor($this) && strcasecmp($method->getImage(), $class->getImage()) !== 0 && strcasecmp($method->getImage(), '__construct') !== 0 && strcasecmp($method->getImage(), '__destruct') !== 0 && strcasecmp($method->getImage(), '__clone') !== 0;
 }