| Conditions | 3 |
| Paths | 3 |
| Total Lines | 24 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 15 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | 54 | public function handle() |
|
| 12 | { |
||
| 13 | 54 | $docset = $this->requestedDocset(); |
|
| 14 | 54 | $action = $this->requestedAction(); |
|
| 15 | |||
| 16 | 54 | if ($action === 'new') { |
|
| 17 | 18 | $this->info('New Docset started'); |
|
| 18 | 18 | (new DocsetBuilder(null, $this))->new(); |
|
| 19 | 18 | $this->info('New Docset finished'); |
|
| 20 | |||
| 21 | 18 | return; |
|
| 22 | } |
||
| 23 | |||
| 24 | 36 | if ($this->isSupported()) { |
|
| 25 | 18 | $this->info(Str::ucfirst("$action started")); |
|
| 26 | 18 | (new DocsetBuilder(new $docset(), $this))->$action(); |
|
| 27 | 18 | $this->info(Str::ucfirst("$action finished")); |
|
| 28 | |||
| 29 | 18 | return; |
|
| 30 | } |
||
| 31 | |||
| 32 | 24 | $this->warn('The doc requested does not seem to be supported.'); |
|
| 33 | |||
| 34 | 24 | return 1; |
|
| 35 | } |
||
| 56 |