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