name: QuestionHelper class_comment: null dependencies: - name: TwoColumnDetail type: class source: Illuminate\Console\View\Components\TwoColumnDetail - name: OutputFormatter type: class source: Symfony\Component\Console\Formatter\OutputFormatter - name: SymfonyQuestionHelper type: class source: Symfony\Component\Console\Helper\SymfonyQuestionHelper - name: OutputInterface type: class source: Symfony\Component\Console\Output\OutputInterface - name: ChoiceQuestion type: class source: Symfony\Component\Console\Question\ChoiceQuestion - name: ConfirmationQuestion type: class source: Symfony\Component\Console\Question\ConfirmationQuestion - name: Question type: class source: Symfony\Component\Console\Question\Question properties: [] methods: - name: ensureEndsWithPunctuation visibility: protected parameters: - name: string comment: "# * {@inheritdoc}\n# *\n# * @return void\n# */\n# #[\\Override]\n# protected\ \ function writePrompt(OutputInterface $output, Question $question): void\n# {\n\ # $text = OutputFormatter::escapeTrailingBackslash($question->getQuestion());\n\ # \n# $text = $this->ensureEndsWithPunctuation($text);\n# \n# $text = \" $text\"\ ;\n# \n# $default = $question->getDefault();\n# \n# if ($question->isMultiline())\ \ {\n# $text .= sprintf(' (press %s to continue)', 'Windows' == PHP_OS_FAMILY\n\ # ? 'Ctrl+Z then Enter'\n# : 'Ctrl+D');\n\ # }\n# \n# switch (true) {\n# case null === $default:\n# $text = sprintf('%s',\ \ $text);\n# \n# break;\n# \n# case $question instanceof ConfirmationQuestion:\n\ # $text = sprintf('%s (yes/no) [%s]', $text, $default\ \ ? 'yes' : 'no');\n# \n# break;\n# \n# case $question instanceof ChoiceQuestion:\n\ # $choices = $question->getChoices();\n# $text = sprintf('%s [%s]',\ \ $text, OutputFormatter::escape($choices[$default] ?? $default));\n# \n# break;\n\ # \n# default:\n# $text = sprintf('%s [%s]', $text,\ \ OutputFormatter::escape($default));\n# \n# break;\n# }\n# \n# $output->writeln($text);\n\ # \n# if ($question instanceof ChoiceQuestion) {\n# foreach ($question->getChoices()\ \ as $key => $value) {\n# with(new TwoColumnDetail($output))->render($value, $key);\n\ # }\n# }\n# \n# $output->write('\u276F ');\n# }\n# \n# /**\n\ # * Ensures the given string ends with punctuation.\n# *\n# * @param string \ \ $string\n# * @return string" traits: - Illuminate\Console\View\Components\TwoColumnDetail - Symfony\Component\Console\Formatter\OutputFormatter - Symfony\Component\Console\Helper\SymfonyQuestionHelper - Symfony\Component\Console\Output\OutputInterface - Symfony\Component\Console\Question\ChoiceQuestion - Symfony\Component\Console\Question\ConfirmationQuestion - Symfony\Component\Console\Question\Question interfaces: []