src/Console/Corrector.php
public static function correct(string $input, array $possibleTokens = []): string
    {
        $guess = static::match($input, $possibleTokens);
        if ($guess === $input) {
            return $guess;
        }

        return static::askForGuess($guess) ? $guess : $input;
    }
public static function correct(string $input, array $possibleTokens = []): string
    {
        $guess = static::match($input, $possibleTokens);
        if ($guess === $input) {
            return $guess;
        }

        return static::askForGuess($guess) ? $guess : $input;
    }
public static function correct ( string $ input , array $ possibleTokens = [ ] ) : string { $ guess = static :: match ( $ input , $ possibleTokens ) ; if ( $ guess === $ input ) { return $ guess ; } return static :: askForGuess ( $ guess ) ? $ guess : $ input ; }
Given user's input, ask user to correct it.

@param string   $input          user's input
@param string[] $possibleTokens candidates of the suggestion

@return string corrected input
Given user s input ask user to correct it .