original_string: protected function sanitizeCommandArgument($key, $value)
      {
          $key  = ltrim($key, '-');
          if (strlen($key) == 1 || is_numeric($key)) {
              $arg = sprintf('-%s', escapeshellarg($key));
              if ($value !== null) {
                  $arg    .= ' '.escapeshellarg($value);
              }
          } else {
              $arg = sprintf('--%s', escapeshellarg($key));
              if ($value !== null) {
                  $arg    .= '='.escapeshellarg($value);
              }
          }
          return $arg;
      }
code: protected function sanitizeCommandArgument($key, $value)
      {
          $key  = ltrim($key, '-');
          if (strlen($key) == 1 || is_numeric($key)) {
              $arg = sprintf('-%s', escapeshellarg($key));
              if ($value !== null) {
                  $arg    .= ' '.escapeshellarg($value);
              }
          } else {
              $arg = sprintf('--%s', escapeshellarg($key));
              if ($value !== null) {
                  $arg    .= '='.escapeshellarg($value);
              }
          }
          return $arg;
      }
code_tokens: protected function sanitizeCommandArgument ( $ key , $ value ) { $ key = ltrim ( $ key , '-' ) ; if ( strlen ( $ key ) == 1 || is_numeric ( $ key ) ) { $ arg = sprintf ( '-%s' , escapeshellarg ( $ key ) ) ; if ( $ value !== null ) { $ arg .= ' ' . escapeshellarg ( $ value ) ; } } else { $ arg = sprintf ( '--%s' , escapeshellarg ( $ key ) ) ; if ( $ value !== null ) { $ arg .= '=' . escapeshellarg ( $ value ) ; } } return $ arg ; }
docstring: Sanitizes a command line argument
  
  @param   string      $key        The argument key
  @param   string      $value      The argument value (can be empty)
  @return  string
docstring_tokens: Sanitizes a command line argument