| Conditions | 2 |
| Paths | 1 |
| Total Lines | 18 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | public function boot() |
||
| 22 | { |
||
| 23 | /* |
||
| 24 | * Returns a select builder. |
||
| 25 | * |
||
| 26 | * @param string $message |
||
| 27 | * @param array $options |
||
| 28 | * @param bool $allowMultiple |
||
| 29 | * |
||
| 30 | * @return array |
||
| 31 | */ |
||
| 32 | Command::macro( |
||
| 33 | 'select', |
||
| 34 | function (string $message = '', array $options = [], bool $allowMultiple = true) { |
||
| 35 | $helper = new SelectionHelper($this->input, $this->output); |
||
| 36 | $question = $allowMultiple ? new CheckboxInput($message, $options) : new RadioInput($message, $options); |
||
| 37 | |||
| 38 | return $helper->select($question); |
||
| 39 | } |
||
| 43 |