original_string: public function buildFunction(\DOMElement $parent, FunctionDescriptor $function, \DOMElement $child = null)
      {
          if (!$child) {
              $child = new \DOMElement('function');
              $parent->appendChild($child);
          }
  
          $namespace = $function->getNamespace()
              ? $function->getNamespace()
              : $parent->getAttribute('namespace');
          $child->setAttribute('namespace', ltrim($namespace, '\\'));
          $child->setAttribute('line', $function->getLine());
  
          $child->appendChild(new \DOMElement('name', $function->getName()));
          $child->appendChild(new \DOMElement('full_name', $function->getFullyQualifiedStructuralElementName()));
  
          $this->docBlockConverter->convert($child, $function);
  
          foreach ($function->getArguments() as $argument) {
              $this->argumentConverter->convert($child, $argument);
          }
      }
code: public function buildFunction(\DOMElement $parent, FunctionDescriptor $function, \DOMElement $child = null)
      {
          if (!$child) {
              $child = new \DOMElement('function');
              $parent->appendChild($child);
          }
  
          $namespace = $function->getNamespace()
              ? $function->getNamespace()
              : $parent->getAttribute('namespace');
          $child->setAttribute('namespace', ltrim($namespace, '\\'));
          $child->setAttribute('line', $function->getLine());
  
          $child->appendChild(new \DOMElement('name', $function->getName()));
          $child->appendChild(new \DOMElement('full_name', $function->getFullyQualifiedStructuralElementName()));
  
          $this->docBlockConverter->convert($child, $function);
  
          foreach ($function->getArguments() as $argument) {
              $this->argumentConverter->convert($child, $argument);
          }
      }
code_tokens: public function buildFunction ( \ DOMElement $ parent , FunctionDescriptor $ function , \ DOMElement $ child = null ) { if ( ! $ child ) { $ child = new \ DOMElement ( 'function' ) ; $ parent -> appendChild ( $ child ) ; } $ namespace = $ function -> getNamespace ( ) ? $ function -> getNamespace ( ) : $ parent -> getAttribute ( 'namespace' ) ; $ child -> setAttribute ( 'namespace' , ltrim ( $ namespace , '\\' ) ) ; $ child -> setAttribute ( 'line' , $ function -> getLine ( ) ) ; $ child -> appendChild ( new \ DOMElement ( 'name' , $ function -> getName ( ) ) ) ; $ child -> appendChild ( new \ DOMElement ( 'full_name' , $ function -> getFullyQualifiedStructuralElementName ( ) ) ) ; $ this -> docBlockConverter -> convert ( $ child , $ function ) ; foreach ( $ function -> getArguments ( ) as $ argument ) { $ this -> argumentConverter -> convert ( $ child , $ argument ) ; } }
docstring: Export this function definition to the given parent DOMElement.
  
  @param \DOMElement        $parent   Element to augment.
  @param FunctionDescriptor $function Element to export.
  @param \DOMElement        $child    if supplied this element will be augmented instead of freshly added.
  
  @return void
docstring_tokens: Export this function definition to the given parent DOMElement .