| Conditions | 3 |
| Paths | 6 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 17 | 5 | public function handle(?CommandRunner $runner = null): int |
|
| 18 | { |
||
| 19 | 5 | $runner ??= new CommandRunner(); |
|
| 20 | 5 | $type = is_string($this->argument('type')) ? $this->argument('type') : ''; |
|
| 21 | |||
| 22 | try { |
||
| 23 | 5 | $runner->increment($type); |
|
| 24 | 4 | $this->output->write($runner->getLastOutput()); |
|
| 25 | 1 | } catch (ModuleException $e) { |
|
| 26 | 1 | $this->error($e->getMessage()); |
|
| 27 | |||
| 28 | 1 | return self::FAILURE; |
|
| 29 | } |
||
| 30 | |||
| 31 | 4 | return self::SUCCESS; |
|
| 32 | } |
||
| 34 |