| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | 2 | public function handle(Command $command): void |
|
| 33 | { |
||
| 34 | 2 | $method = 'handle'.ucfirst($command->getName()); |
|
| 35 | |||
| 36 | 2 | if (!method_exists($this, $method)) { |
|
| 37 | 1 | throw new RuntimeException('No handle method for "'.$command->getName().'".'); |
|
| 38 | } |
||
| 39 | |||
| 40 | 1 | $this->$method($command); |
|
| 41 | 1 | } |
|
| 42 | } |
||
| 43 |