original_string: public function newSwitch($name, $group = null)
      {
          $arg = OptionItem::createSwitch($name);
  
          if ($this->obj_color->opt) {
              $arg->color($this->obj_color->opt);
          }
  
          if ($this->obj_color->bold) {
              $arg->bold();
          }
  
          self::add($arg, $group);
  
          return self::getOpt($name);
      }
code: public function newSwitch($name, $group = null)
      {
          $arg = OptionItem::createSwitch($name);
  
          if ($this->obj_color->opt) {
              $arg->color($this->obj_color->opt);
          }
  
          if ($this->obj_color->bold) {
              $arg->bold();
          }
  
          self::add($arg, $group);
  
          return self::getOpt($name);
      }
code_tokens: public function newSwitch ( $ name , $ group = null ) { $ arg = OptionItem :: createSwitch ( $ name ) ; if ( $ this -> obj_color -> opt ) { $ arg -> color ( $ this -> obj_color -> opt ) ; } if ( $ this -> obj_color -> bold ) { $ arg -> bold ( ) ; } self :: add ( $ arg , $ group ) ; return self :: getOpt ( $ name ) ; }
docstring: Adds a new option switch.
  
  @param  string     $name  The string to identify and call this option.
  @param  string     $group Optional group's name
  @access public
  @return OptionItem The newly created option, to chain methods.
docstring_tokens: Adds a new option switch .