original_string: private function parseShortOptionSet($name)
      {
          $len = \strlen($name);
          for ($i = 0; $i < $len; ++$i) {
              if (!$this->definition->hasShortcut($name[$i])) {
                  $encoding = mb_detect_encoding($name, null, true);
                  throw new RuntimeException(sprintf('The "-%s" option does not exist.', false === $encoding ? $name[$i] : mb_substr($name, $i, 1, $encoding)));
              }
  
              $option = $this->definition->getOptionForShortcut($name[$i]);
              if ($option->acceptValue()) {
                  $this->addLongOption($option->getName(), $i === $len - 1 ? null : substr($name, $i + 1));
  
                  break;
              } else {
                  $this->addLongOption($option->getName(), null);
              }
          }
      }
code: private function parseShortOptionSet($name)
      {
          $len = \strlen($name);
          for ($i = 0; $i < $len; ++$i) {
              if (!$this->definition->hasShortcut($name[$i])) {
                  $encoding = mb_detect_encoding($name, null, true);
                  throw new RuntimeException(sprintf('The "-%s" option does not exist.', false === $encoding ? $name[$i] : mb_substr($name, $i, 1, $encoding)));
              }
  
              $option = $this->definition->getOptionForShortcut($name[$i]);
              if ($option->acceptValue()) {
                  $this->addLongOption($option->getName(), $i === $len - 1 ? null : substr($name, $i + 1));
  
                  break;
              } else {
                  $this->addLongOption($option->getName(), null);
              }
          }
      }
code_tokens: private function parseShortOptionSet ( $ name ) { $ len = \ strlen ( $ name ) ; for ( $ i = 0 ; $ i < $ len ; ++ $ i ) { if ( ! $ this -> definition -> hasShortcut ( $ name [ $ i ] ) ) { $ encoding = mb_detect_encoding ( $ name , null , true ) ; throw new RuntimeException ( sprintf ( 'The "-%s" option does not exist.' , false === $ encoding ? $ name [ $ i ] : mb_substr ( $ name , $ i , 1 , $ encoding ) ) ) ; } $ option = $ this -> definition -> getOptionForShortcut ( $ name [ $ i ] ) ; if ( $ option -> acceptValue ( ) ) { $ this -> addLongOption ( $ option -> getName ( ) , $ i === $ len - 1 ? null : substr ( $ name , $ i + 1 ) ) ; break ; } else { $ this -> addLongOption ( $ option -> getName ( ) , null ) ; } } }
docstring: Parses a short option set.
  
  @param string $name The current token
  
  @throws RuntimeException When option given doesn't exist
docstring_tokens: Parses a short option set .