src/Installer.php
public function askUntillValid(string $prompt, callable $validationCallback)
    {
        $result = null;

        while($validationCallback($result) !== true) {
            $result = $this->readLine("$prompt");
        }
        return $result;
    }
public function askUntillValid(string $prompt, callable $validationCallback)
    {
        $result = null;

        while($validationCallback($result) !== true) {
            $result = $this->readLine("$prompt");
        }
        return $result;
    }
public function askUntillValid ( string $ prompt , callable $ validationCallback ) { $ result = null ; while ( $ validationCallback ( $ result ) !== true ) { $ result = $ this -> readLine ( "$prompt" ) ; } return $ result ; }
Prompt user for input untill the given input returns true from the
validation callback function.

@param string $prompt the prompt message
@param callable $validationCallback
@return $result user input that passed validation
Prompt user for input untill the given input returns true from the validation callback function .