original_string: public function addOption(Option $option, string $optgroup = ''): Select
      {
          if (empty($optgroup)) {
              $this->options[] = $option;
          }
          else {
              $this->options[$optgroup][] = $option;
          }
  
          return $this;
      }
code: public function addOption(Option $option, string $optgroup = ''): Select
      {
          if (empty($optgroup)) {
              $this->options[] = $option;
          }
          else {
              $this->options[$optgroup][] = $option;
          }
  
          return $this;
      }
code_tokens: public function addOption ( Option $ option , string $ optgroup = '' ) : Select { if ( empty ( $ optgroup ) ) { $ this -> options [ ] = $ option ; } else { $ this -> options [ $ optgroup ] [ ] = $ option ; } return $ this ; }
docstring: Add an html option object to the optionlist
  
  @param Option $option
  @param string $optgroup
  Related optgroup
  
  @return Select
docstring_tokens: Add an html option object to the optionlist