示例#1
0
文件: Parser.php 项目: noelg/phpmd
 /**
  * Collects the collected metrics for the given node and adds them to the
  * <b>$node</b>.
  *
  * @param PHP_PMD_AbstractNode $node The context source node.
  *
  * @return void
  */
 private function _collectMetrics(PHP_PMD_AbstractNode $node)
 {
     $metrics = array();
     $pdepend = $node->getNode();
     foreach ($this->_analyzers as $analyzer) {
         $metrics = array_merge($metrics, $analyzer->getNodeMetrics($pdepend));
     }
     $node->setMetrics($metrics);
 }