Ptondereau\PackMe\Commands\AbstractBaseCommand::askAndValidate PHP Метод

askAndValidate() защищенный Метод

protected askAndValidate ( string $question, Closure $validator, null $attempts = null, null $default = null ) : string
$question string
$validator Closure
$attempts null
$default null
Результат string
    protected function askAndValidate($question, $validator, $attempts = null, $default = null)
    {
        /** @var QuestionHelper $helper */
        $helper = $this->helperSet->get('question');
        $question = new Question($question, $default);
        $question->setValidator($validator);
        $question->setMaxAttempts($attempts);
        return $helper->ask($this->input, $this->getErrorOutput(), $question);
    }