original_string: public function xml(SimpleXMLElement $parent)
      {
          $option = $parent->addChild('argument');
          $option->addAttribute('name', $this->_name);
          $option->addAttribute('help', $this->_help);
          $option->addAttribute('required', (int)$this->isRequired());
          $choices = $option->addChild('choices');
          foreach ($this->_choices as $valid) {
              $choices->addChild('choice', $valid);
          }
  
          return $parent;
      }
code: public function xml(SimpleXMLElement $parent)
      {
          $option = $parent->addChild('argument');
          $option->addAttribute('name', $this->_name);
          $option->addAttribute('help', $this->_help);
          $option->addAttribute('required', (int)$this->isRequired());
          $choices = $option->addChild('choices');
          foreach ($this->_choices as $valid) {
              $choices->addChild('choice', $valid);
          }
  
          return $parent;
      }
code_tokens: public function xml ( SimpleXMLElement $ parent ) { $ option = $ parent -> addChild ( 'argument' ) ; $ option -> addAttribute ( 'name' , $ this -> _name ) ; $ option -> addAttribute ( 'help' , $ this -> _help ) ; $ option -> addAttribute ( 'required' , ( int ) $ this -> isRequired ( ) ) ; $ choices = $ option -> addChild ( 'choices' ) ; foreach ( $ this -> _choices as $ valid ) { $ choices -> addChild ( 'choice' , $ valid ) ; } return $ parent ; }
docstring: Append this arguments XML representation to the passed in SimpleXml object.
  
  @param \SimpleXMLElement $parent The parent element.
  @return \SimpleXMLElement The parent with this argument appended.
docstring_tokens: Append this arguments XML representation to the passed in SimpleXml object .