class SymfonyQuestionHelper extends QuestionHelper
{ /**
* @return void
*/
protected function writePrompt(OutputInterface
$output, Question
$question) { $text = OutputFormatter::
escapeTrailingBackslash($question->
getQuestion());
$default =
$question->
getDefault();
if ($question->
isMultiline()) { $text .=
sprintf(' (press %s to continue)',
$this->
getEofShortcut());
} switch (true
) { case null ===
$default:
$text =
sprintf(' <info>%s</info>:',
$text);
break;
case $question instanceof ConfirmationQuestion:
$text =
sprintf(' <info>%s (yes/no)</info> [<comment>%s</comment>]:',
$text,
$default ? 'yes' : 'no'
);