original_string: public function convert(\DOMElement $parent, ConstantDescriptor $constant)
      {
          $fullyQualifiedNamespaceName = $constant->getNamespace() instanceof NamespaceDescriptor
              ? $constant->getNamespace()->getFullyQualifiedStructuralElementName()
              : $parent->getAttribute('namespace');
  
          $child = new \DOMElement('constant');
          $parent->appendChild($child);
  
          $child->setAttribute('namespace', ltrim($fullyQualifiedNamespaceName, '\\'));
          $child->setAttribute('line', $constant->getLine());
  
          $child->appendChild(new \DOMElement('name', $constant->getName()));
          $child->appendChild(new \DOMElement('full_name', $constant->getFullyQualifiedStructuralElementName()));
          $child->appendChild(new \DOMElement('value'))->appendChild(new \DOMText($constant->getValue()));
  
          $this->docBlockConverter->convert($child, $constant);
  
          return $child;
      }
code: public function convert(\DOMElement $parent, ConstantDescriptor $constant)
      {
          $fullyQualifiedNamespaceName = $constant->getNamespace() instanceof NamespaceDescriptor
              ? $constant->getNamespace()->getFullyQualifiedStructuralElementName()
              : $parent->getAttribute('namespace');
  
          $child = new \DOMElement('constant');
          $parent->appendChild($child);
  
          $child->setAttribute('namespace', ltrim($fullyQualifiedNamespaceName, '\\'));
          $child->setAttribute('line', $constant->getLine());
  
          $child->appendChild(new \DOMElement('name', $constant->getName()));
          $child->appendChild(new \DOMElement('full_name', $constant->getFullyQualifiedStructuralElementName()));
          $child->appendChild(new \DOMElement('value'))->appendChild(new \DOMText($constant->getValue()));
  
          $this->docBlockConverter->convert($child, $constant);
  
          return $child;
      }
code_tokens: public function convert ( \ DOMElement $ parent , ConstantDescriptor $ constant ) { $ fullyQualifiedNamespaceName = $ constant -> getNamespace ( ) instanceof NamespaceDescriptor ? $ constant -> getNamespace ( ) -> getFullyQualifiedStructuralElementName ( ) : $ parent -> getAttribute ( 'namespace' ) ; $ child = new \ DOMElement ( 'constant' ) ; $ parent -> appendChild ( $ child ) ; $ child -> setAttribute ( 'namespace' , ltrim ( $ fullyQualifiedNamespaceName , '\\' ) ) ; $ child -> setAttribute ( 'line' , $ constant -> getLine ( ) ) ; $ child -> appendChild ( new \ DOMElement ( 'name' , $ constant -> getName ( ) ) ) ; $ child -> appendChild ( new \ DOMElement ( 'full_name' , $ constant -> getFullyQualifiedStructuralElementName ( ) ) ) ; $ child -> appendChild ( new \ DOMElement ( 'value' ) ) -> appendChild ( new \ DOMText ( $ constant -> getValue ( ) ) ) ; $ this -> docBlockConverter -> convert ( $ child , $ constant ) ; return $ child ; }
docstring: Export the given reflected constant definition to the provided parent element.
  
  @param \DOMElement        $parent Element to augment.
  @param ConstantDescriptor $constant Element to export.
  
  @return \DOMElement
docstring_tokens: Export the given reflected constant definition to the provided parent element .