/** * Collects the collected metrics for the given node and adds them to the * <b>$node</b>. * * @param \PHPMD\AbstractNode $node * @return void */ private function collectMetrics(AbstractNode $node) { $metrics = array(); $pdepend = $node->getNode(); foreach ($this->analyzers as $analyzer) { $metrics = array_merge($metrics, $analyzer->getNodeMetrics($pdepend)); } $node->setMetrics($metrics); }