original_string: protected function simpleOpt($opt, $disc = '')
      {
          $type = $this->getOptionType($opt);
          $key = $this->stripOpt($opt);
          //
          if ($type == self::REQUIRED) {
              $key = substr($key, 0, -1);
              $this->addOption($key, null, InputOption::VALUE_REQUIRED, $disc);
              $this->addOptionInput($key, InputOption::VALUE_REQUIRED, $disc);
          } elseif ($type == self::OPTIONAL) {
              $this->addOption($key, null, InputOption::VALUE_NONE, $disc);
              $this->addOptionInput($key, InputOption::VALUE_NONE, $disc);
          } elseif ($type == self::VALUE) {
              $value = $this->getOptionalValue($key);
              //
              $key = $this->getOptionalKeyValue($key);
              //
              $this->addOption($key, null, InputOption::VALUE_OPTIONAL, $disc, $value);
              $this->addOptionInput($key, InputOption::VALUE_OPTIONAL, $disc, $value);
          }
      }
code: protected function simpleOpt($opt, $disc = '')
      {
          $type = $this->getOptionType($opt);
          $key = $this->stripOpt($opt);
          //
          if ($type == self::REQUIRED) {
              $key = substr($key, 0, -1);
              $this->addOption($key, null, InputOption::VALUE_REQUIRED, $disc);
              $this->addOptionInput($key, InputOption::VALUE_REQUIRED, $disc);
          } elseif ($type == self::OPTIONAL) {
              $this->addOption($key, null, InputOption::VALUE_NONE, $disc);
              $this->addOptionInput($key, InputOption::VALUE_NONE, $disc);
          } elseif ($type == self::VALUE) {
              $value = $this->getOptionalValue($key);
              //
              $key = $this->getOptionalKeyValue($key);
              //
              $this->addOption($key, null, InputOption::VALUE_OPTIONAL, $disc, $value);
              $this->addOptionInput($key, InputOption::VALUE_OPTIONAL, $disc, $value);
          }
      }
code_tokens: protected function simpleOpt ( $ opt , $ disc = '' ) { $ type = $ this -> getOptionType ( $ opt ) ; $ key = $ this -> stripOpt ( $ opt ) ; // if ( $ type == self :: REQUIRED ) { $ key = substr ( $ key , 0 , - 1 ) ; $ this -> addOption ( $ key , null , InputOption :: VALUE_REQUIRED , $ disc ) ; $ this -> addOptionInput ( $ key , InputOption :: VALUE_REQUIRED , $ disc ) ; } elseif ( $ type == self :: OPTIONAL ) { $ this -> addOption ( $ key , null , InputOption :: VALUE_NONE , $ disc ) ; $ this -> addOptionInput ( $ key , InputOption :: VALUE_NONE , $ disc ) ; } elseif ( $ type == self :: VALUE ) { $ value = $ this -> getOptionalValue ( $ key ) ; // $ key = $ this -> getOptionalKeyValue ( $ key ) ; // $ this -> addOption ( $ key , null , InputOption :: VALUE_OPTIONAL , $ disc , $ value ) ; $ this -> addOptionInput ( $ key , InputOption :: VALUE_OPTIONAL , $ disc , $ value ) ; } }
docstring: set simple option with optional description.
docstring_tokens: set simple option with optional description .