protected function getOptionError($option)
    {
        $availableOptions = array_keys($this->_options);
        $bestGuess = $this->findClosestItem($option, $availableOptions);
        $out = [
            sprintf('Unknown option `%s`.', $option),
            ''
        ];

        if ($bestGuess !== null) {
            $out[] = sprintf('Did you mean `%s` ?', $bestGuess);
            $out[] = '';
        }

        $out[] = 'Available options are :';
        $out[] = '';
        foreach ($availableOptions as $availableOption) {
            $out[] = ' - ' . $availableOption;
        }

        return implode("\n", $out);
    }
protected function getOptionError($option)
    {
        $availableOptions = array_keys($this->_options);
        $bestGuess = $this->findClosestItem($option, $availableOptions);
        $out = [
            sprintf('Unknown option `%s`.', $option),
            ''
        ];

        if ($bestGuess !== null) {
            $out[] = sprintf('Did you mean `%s` ?', $bestGuess);
            $out[] = '';
        }

        $out[] = 'Available options are :';
        $out[] = '';
        foreach ($availableOptions as $availableOption) {
            $out[] = ' - ' . $availableOption;
        }

        return implode("\n", $out);
    }
protected function getOptionError ( $ option ) { $ availableOptions = array_keys ( $ this -> _options ) ; $ bestGuess = $ this -> findClosestItem ( $ option , $ availableOptions ) ; $ out = [ sprintf ( 'Unknown option `%s`.' , $ option ) , '' ] ; if ( $ bestGuess !== null ) { $ out [ ] = sprintf ( 'Did you mean `%s` ?' , $ bestGuess ) ; $ out [ ] = '' ; } $ out [ ] = 'Available options are :' ; $ out [ ] = '' ; foreach ( $ availableOptions as $ availableOption ) { $ out [ ] = ' - ' . $ availableOption ; } return implode ( "\n" , $ out ) ; }
Get the message output in the console stating that the option can not be found and tries to guess what the user
wanted to say. Output a list of available options as well.

@param string $option Unknown option name trying to be used.
@return string The message to be displayed in the console.
Get the message output in the console stating that the option can not be found and tries to guess what the user wanted to say . Output a list of available options as well .