1 | <?php |
||
22 | class Handler extends ExceptionHandler |
||
23 | { |
||
24 | /** |
||
25 | * A list of the exception types that should not be reported. |
||
26 | * |
||
27 | * @var array |
||
28 | */ |
||
29 | protected $dontReport = [ |
||
30 | 'Symfony\Component\HttpKernel\Exception\HttpException', |
||
31 | ]; |
||
32 | |||
33 | /** |
||
34 | * Report or log an exception. |
||
35 | * |
||
36 | * This is a great spot to send exceptions to Sentry, Bugsnag, etc. |
||
37 | * |
||
38 | * @param \Exception $e |
||
39 | * |
||
40 | * @return void |
||
41 | */ |
||
42 | 14 | public function report(Exception $e) |
|
46 | |||
47 | /** |
||
48 | * Render an exception into an HTTP response. |
||
49 | * |
||
50 | * @param \Illuminate\Http\Request $request |
||
51 | * @param \Exception $e |
||
52 | * |
||
53 | * @return \Illuminate\Http\Response |
||
54 | */ |
||
55 | 14 | public function render($request, Exception $e) |
|
63 | } |
||
64 |
This check looks for parameters that are defined as one type in their type hint or doc comment but seem to be used as a narrower type, i.e an implementation of an interface or a subclass.
Consider changing the type of the parameter or doing an instanceof check before assuming your parameter is of the expected type.