Take an option and return a question string.

@param \Symfony\Component\Console\Input\InputOption $option
@param $default

@return string
966337
private function getQuestionString(InputOption $option, $default)
    {
        if ('' !== (string) $default) {
            if (stripos($option->getName(), 'password') !== false) {
                return sprintf('%s? [<options=bold>HIDDEN</>]: ', $option->getDescription(), $default);
            }

            return sprintf('%s? [<options=bold>%s</>]: ', $option->getDescription(), $default);
        }

        return sprintf('%s?: ', $option->getDescription());
    }
1192465
public function getOption($option, $default = null)
    {
        if (in_array($option, $this->availableOptions)) {
            $method = 'get' . ucfirst($option);
            if (method_exists($this, $method)) {
                return $this->$method();
            } elseif (!empty($this->$option)) {
                return $this->$option;
            }

            return $default;
        } else {
            throw new ApiClientException(sprintf('Trying to get unknown option "%s" on %s ', $option, get_class($this)));
        }
    }
1280807
public function getOption(string $name, $default = null)
    {
        if (!$this->hasOption($name)) {
            return $default;
        }

        return $this->_options[$name];
    }
571053
public function ask($string, $default = null) {
        if ($default === true) {
            $suffix = 'Y/n';
        } else if ($default === false) {
            $suffix = 'y/N';
        } else {
            $suffix = 'y/n';
        }

        $this->output->write(
            "<question>$string</question> [<yellow>$suffix</yellow>]: "
        );
        $input = $this->input->readLine();

        if (array_contains(['yes', 'y'], $input)) {
            return true;
        }

        if (array_contains(['no', 'n'], $input)) {
            return false;
        }

        if (empty($input)) {
            if ($default === true) {
                return true;
            }

            if ($default === false) {
                return false;
            }
        }

        return $this->ask($string, $default);
    }
928165
public function findOption(string $name, $default = null)
    {
        if (array_key_exists($name, $this->options)) {
            return $this->options[$name];
        }

        return $default;
    }
136107
public function optionOrAsk($option, $question, $default = null)
    {
        $value = $this->input->getOption($option);
        if ($value === null || Str::likeEmpty($value)) {
            $value = $this->ask($question, $default);
        }

        return $value;
    }
256124
public function getOption($name, $default = null)
    {
        $data = new Data((array)get_option($this->registry['option_name']));
        return $data->get($name, $default);
    }
795354
protected static function getOption($name, $default = null)
    {
        return isset(self::$options[$name]) ? self::$options[$name] : $default;
    }
1291590
public function getOption($field, $default = null)
    {
        return isset($this->options[$field]) ? $this->options[$field] : $default;
    }
946809
public function getOption($option, $default = null)
    {
        if (array_key_exists($option, $this->options)) {
            return $this->options[$option];
        }
        return $default;
    }
500899
protected function getOptions($options = null, $default = [])
    {
        if (empty($options)) {
            return $default;
        }
        if ($options instanceof Collection) {
            return $options->toArray();
        }
        if ($options instanceof Closure) {
            return $this->getOptions(call_user_func($options));
        }
        if (is_array($options)) {
            return $options;
        }
        return $options->toArray();
    }
353539
public function ask(string $question, $default = 'n', ?array $options = null)
	{
		$options = $options === null ? ['y' => true, 'n' => false] : $this->normalizeKeys($options);

		$input = parent::ask(trim($question) . ' [' . $this->getOptions($options, $default) . '] ');

		$input = mb_strtolower(empty($input) ? $default : $input);

		if(!isset($options[$input]))
		{
			return $this->ask($question, $default, $options);
		}

		return $options[$input];
	}
64998
final protected function askInput($question, $defaultValue)
    {
        $indent = ($this->indent > 0) ? $this->indent : 0;
        $prompt = empty($defaultValue) && 0 !== $defaultValue ? '' : sprintf(' [<info>%s</info>]', $defaultValue);
        $question = sprintf('%s%s%s: ', str_repeat(' ', 4 * $indent), $question, $prompt);

        $question = new Question($question, $defaultValue);
        return $this->getHelper('question')->ask($this->input, $this->output, $question);
    }
660028
protected function _getOption( $name, $default = null )
	{
		return ( isset( $this->_options[$name] ) ? $this->_options[$name] : $default );
	}
735453
public function getFormattedQuestion($question, $default, array $options)
    {
        if ($this->isList($options)) {
            /**
             * Options list mode
             */
            return $this->getFormattedListQuestion($question, $default, $options);
        } else {
            /**
             * Simple options mode
             */
            return $this->getFormattedSimpleQuestion($question, $default, $options);
        }
    }
93610
public function getOption($option, $default = NULL)
	{
		return isset($this->options[ $option ]) ? $this->options[ $option ] : $default;
	}
248775
public static function input($key=null,$default=null){
      return $key ? (isset(static::$options[$key]) ? static::$options[$key] : (is_callable($default)?call_user_func($default):$default)) : static::$options;
    }