| Conditions | 3 |
| Paths | 4 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | protected function convertExceptionToWhoops(Exception $e) |
||
| 32 | { |
||
| 33 | $whoops = new Whoops(); |
||
| 34 | $whoops->pushHandler($this->getWhoopsHandler()); |
||
| 35 | |||
| 36 | $statusCode = method_exists($e, 'getStatusCode') ? $e->getStatusCode() : 500; |
||
| 37 | $headers = method_exists($e, 'getHeaders') ? $e->getHeaders() : []; |
||
| 38 | |||
| 39 | return response()->make($whoops->handleException($e), $statusCode, $headers); |
||
|
|
|||
| 40 | } |
||
| 41 | |||
| 55 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: