3 namespace Cli\Services;
5 use Symfony\Component\Console\Helper\QuestionHelper;
6 use Symfony\Component\Console\Input\InputInterface;
7 use Symfony\Component\Console\Output\OutputInterface;
8 use Symfony\Component\Console\Question\ConfirmationQuestion;
10 class InteractiveConsole
14 public function __construct(
15 protected QuestionHelper $helper,
16 protected InputInterface $input,
17 protected OutputInterface $output,
22 public function confirm(string $text): bool
24 $question = new ConfirmationQuestion($text . " (y/n)\n", false);
25 return $this->helper->ask($this->input, $this->output, $question);