| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 6 | public function __invoke($request, $response, $exception) |
||
| 7 | { |
||
| 8 | if($exception->getCode() === \Http\Rest\ACCESS_DENIED) |
||
| 9 | { |
||
| 10 | return $response->withStatus(401); |
||
| 11 | } |
||
| 12 | return $response |
||
| 13 | ->withStatus(500) |
||
| 14 | ->withHeader('Content-Type', 'text/html') |
||
| 15 | ->write(print_r($exception, true)); |
||
| 16 | } |
||
| 17 | } |
||
| 18 |