Esempio n. 1
0
 /**
  * Constructs a new collection instance.
  *
  * @param PHP_PMD_AbstractNode $node The context/parent node.
  */
 public function __construct(PHP_PMD_AbstractNode $node)
 {
     preg_match_all($this->_regexp, $node->getDocComment(), $matches);
     foreach (array_keys($matches[0]) as $i) {
         $name = $matches[1][$i];
         $value = trim($matches[2][$i], '" ');
         $this->_annotations[] = new PHP_PMD_Node_Annotation($name, $value);
     }
 }
 /**
  * Returns <b>true</b> when the given node is method with signature declared as inherited using
  * {@inheritdoc} annotation.
  *
  * @param PHP_PMD_AbstractNode $node The context method or function instance.
  *
  * @return boolean
  */
 private function isInheritedSignature(PHP_PMD_AbstractNode $node)
 {
     if ($node instanceof PHP_PMD_Node_Method) {
         return preg_match('/\\@inheritdoc/', $node->getDocComment());
     }
     return false;
 }