| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 17 | public function execute(string $request): void |
||
| 18 | { |
||
| 19 | if ($request === get_called_class()) { |
||
| 20 | printf("%s %s".PHP_EOL, get_called_class(), "has handle an error"); |
||
| 21 | return; |
||
| 22 | } |
||
| 23 | |||
| 24 | if (!isset($this->nextHandler)) { |
||
| 25 | throw new \InvalidArgumentException($request . " does not exist in the chain"); |
||
| 26 | } |
||
| 27 | |||
| 28 | $this->nextHandler->execute($request); |
||
| 29 | } |
||
| 41 |