Conditions | 4 |
Paths | 4 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | protected function autoOrYesConfirmation(string $question = 'ÉDITION ?'): bool |
||
21 | { |
||
22 | $this->modeAuto = $this->modeAuto ?? false; |
||
1 ignored issue
–
show
|
|||
23 | if ($this->modeAuto) { |
||
24 | return true; |
||
25 | } |
||
26 | $ask = readline(Color::LIGHT_MAGENTA . '*** '.$question.' [y/n/auto]' . Color::NORMAL); |
||
27 | if ('auto' === $ask) { |
||
28 | $this->modeAuto = true; |
||
29 | |||
30 | return true; |
||
31 | } |
||
32 | if ('y' === $ask) { |
||
33 | return true; |
||
34 | } |
||
35 | |||
36 | return false; |
||
37 | } |
||
38 | } |