示例#1
0
文件: Xml.php 项目: pdepend/pdepend
 /**
  * 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);
 }