Ejemplo n.º 1
0
 /**
  * Visits a method node.
  *
  * @param  \PDepend\Source\AST\ASTMethod $method
  * @return void
  */
 public function visitMethod(ASTMethod $method)
 {
     $xml = end($this->xmlStack);
     $doc = $xml->ownerDocument;
     $methodXml = $doc->createElement('method');
     $methodXml->setAttribute('name', Utf8Util::ensureEncoding($method->getName()));
     $methodXml->setAttribute('start', Utf8Util::ensureEncoding($method->getStartLine()));
     $methodXml->setAttribute('end', Utf8Util::ensureEncoding($method->getEndLine()));
     $this->writeNodeMetrics($methodXml, $method);
     $xml->appendChild($methodXml);
 }