| Conditions | 3 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3.1406 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 34 | 2 | public function call(Route $route) |
|
| 35 | { |
||
| 36 | try { |
||
| 37 | 2 | $response = call_user_func($route->getAction(), $this->request, $this->response, $route->getMergedParams()); |
|
| 38 | |||
| 39 | 2 | if ($response instanceof ResponseInterface) { |
|
| 40 | 1 | return $response; |
|
| 41 | } |
||
| 42 | |||
| 43 | 1 | $this->response->getBody()->write((string) $response); |
|
| 44 | 1 | return $this->response; |
|
| 45 | } catch (HttpExceptionAbstract $e) { |
||
| 46 | return $e->getResponse($this->response); |
||
| 47 | } |
||
| 48 | } |
||
| 49 | |||
| 51 |