/** * Adds an analyzer to log. If this logger accepts the given analyzer it * with return <b>true</b>, otherwise the return value is <b>false</b>. * * @param PHP_Depend_Metrics_AnalyzerI $analyzer The analyzer to log. * * @return boolean */ public function log(PHP_Depend_Metrics_AnalyzerI $analyzer) { $accept = false; if ($analyzer instanceof PHP_Depend_Metrics_ProjectAwareI) { // Get project metrics $metrics = $analyzer->getProjectMetrics(); // Merge with existing metrics. $this->projectMetrics = array_merge($this->projectMetrics, $metrics); $accept = true; } if ($analyzer instanceof PHP_Depend_Metrics_NodeAwareI) { $this->_nodeAwareAnalyzers[] = $analyzer; $accept = true; } return $accept; }