protected function askForString($key, $required = false, $default = null, array $values = [], $minLength = 0) {
        $question = sprintf(
            'What is the value for configuration setting "%s"',
            $key
        );

        if (count($values) > 0) {
            $question .= sprintf(
                ' (%s)',
                implode(', ', $values)
            );
        }

        $question .= '?';

        if (isset($default)) {
            $question .= sprintf(' [%s]:', $default);
        }

        $answer = IO::in($question);

        if (strlen($answer) === 0 && $required && !isset($default)) {
            $this->log->warning('This setting is required. You need to set a value.');
            return $this->askForString($key, $required, $default, $values, $minLength);
        } elseif (strlen($answer) === 0 && isset($default)) {
            return $default;
        } elseif (count($values) && !in_array($answer, $values)) {
            $this->log->warning(
                'Wrong answer. Here are your options: %s',
                implode(', ', $values)
            );
            return $this->askForString($key, $required, $default, $values, $minLength);
        } elseif (strlen($answer) > 0 && strlen($answer) < $minLength) {
            $this->log->warning(
                'Value must have at least %s character(s)',
                $minLength
            );
            return $this->askForString($key, $required, $default, $values, $minLength);
        } elseif (strlen($answer) > 0) {
            return $answer;
        }

        return null;
    }