| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 29 | public function handle(ServerRequestInterface $request): ResponseInterface |
||
| 30 | { |
||
| 31 | $response = ($this->handler)($request); |
||
| 32 | |||
| 33 | if (!$response instanceof ResponseInterface) { |
||
| 34 | throw new DispatchException( |
||
| 35 | 'Handler callable must return a ResponseInterface object. Found: ' . gettype($response) |
||
| 36 | ); |
||
| 37 | } |
||
| 38 | |||
| 39 | return $response; |
||
| 40 | } |
||
| 42 |