Total Complexity | 3 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
12 | class ChoiceQuestion extends BaseQuestion |
||
13 | { |
||
14 | /** @var string[] */ |
||
15 | private $choices; |
||
16 | |||
17 | public function __construct(QuestionHelper $helper, InputInterface $input, OutputInterface $output, string $question, array $choices) |
||
18 | { |
||
19 | parent::__construct($helper, $input, $output, $question); |
||
20 | $this->choices = $choices; |
||
21 | } |
||
22 | |||
23 | /** |
||
24 | * @return string |
||
25 | */ |
||
26 | public function askSingleChoiceQuestion() : string |
||
27 | { |
||
28 | $question = new \Symfony\Component\Console\Question\ChoiceQuestion($this->question, $this->choices); |
||
29 | return $this->helper->ask($this->input, $this->output, $question); |
||
|
|||
30 | } |
||
31 | |||
32 | /** |
||
33 | * @return string[] |
||
34 | */ |
||
35 | public function askMultipleChoiceQuestion() : array |
||
40 | } |
||
41 | } |
||
42 |