Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
12 | 2 | public function process(ServerRequestInterface $request, RequestHandlerInterface $requestHandler): ResponseInterface |
|
13 | { |
||
14 | 2 | $controller = $request->getAttribute('controller'); |
|
15 | 2 | if (!$controller instanceof ControllerInterface) { |
|
16 | 1 | throw new \RuntimeException('Invalid controller type: ' . get_class($controller)); |
|
17 | } |
||
18 | |||
19 | 1 | return $controller->execute($request); |
|
20 | } |
||
22 |