| Total Complexity | 2 |
| Total Lines | 53 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | abstract class AbstractQuestion |
||
| 10 | { |
||
| 11 | /** @var QuestionHelper */ |
||
| 12 | protected $helper; |
||
| 13 | |||
| 14 | /** @var InputInterface */ |
||
| 15 | protected $input; |
||
| 16 | |||
| 17 | /** @var OutputInterface */ |
||
| 18 | protected $output; |
||
| 19 | |||
| 20 | /** @var string */ |
||
| 21 | protected $question; |
||
| 22 | |||
| 23 | /** @var string|null */ |
||
| 24 | protected $default; |
||
| 25 | |||
| 26 | /** @var string|null */ |
||
| 27 | protected $helpText; |
||
| 28 | |||
| 29 | /** @var bool */ |
||
| 30 | protected $printAnswer; |
||
| 31 | |||
| 32 | public function __construct(InputInterface $input, OutputInterface $output, QuestionHelper $helper, string $question, bool $printAnswer = true) |
||
| 33 | { |
||
| 34 | $this->helper = $helper; |
||
| 35 | $this->input = $input; |
||
| 36 | $this->output = $output; |
||
| 37 | $this->question = $question; |
||
| 38 | $this->printAnswer = $printAnswer; |
||
| 39 | } |
||
| 40 | |||
| 41 | protected function spacer(): void |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @param string $default |
||
| 48 | * @return mixed |
||
| 49 | */ |
||
| 50 | abstract public function setDefault(string $default); |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @param string $helpText |
||
| 54 | * @return mixed |
||
| 55 | */ |
||
| 56 | abstract public function setHelpText(string $helpText); |
||
| 57 | |||
| 58 | /** |
||
| 59 | * @return mixed |
||
| 60 | */ |
||
| 61 | abstract public function ask(); |
||
| 62 | } |
||
| 63 |