PDepend\Report\Summary\Xml::writeNodeMetrics PHP Method

writeNodeMetrics() protected method

Aggregates all metrics for the given $node instance and adds them to the \DOMElement
protected writeNodeMetrics ( DOMElement $xml, PDepend\Source\AST\AbstractASTArtifact $node ) : void
$xml DOMElement
$node PDepend\Source\AST\AbstractASTArtifact
return void
    protected function writeNodeMetrics(\DOMElement $xml, AbstractASTArtifact $node)
    {
        $metrics = array();
        foreach ($this->nodeAwareAnalyzers as $analyzer) {
            $metrics = array_merge($metrics, $analyzer->getNodeMetrics($node));
        }
        foreach ($metrics as $name => $value) {
            $xml->setAttribute($name, $value);
        }
    }