We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
1 | <?php |
||
12 | class Handler extends ExceptionHandler |
||
13 | { |
||
14 | /** |
||
15 | * A list of the exception types that are not reported. |
||
16 | * |
||
17 | * @var array |
||
18 | */ |
||
19 | protected $dontReport = [ |
||
20 | /*\Illuminate\Auth\AuthenticationException::class, |
||
21 | \Illuminate\Auth\Access\AuthorizationException::class, |
||
22 | \Symfony\Component\HttpKernel\Exception\HttpException::class, |
||
23 | \Illuminate\Database\Eloquent\ModelNotFoundException::class, |
||
24 | \Illuminate\Session\TokenMismatchException::class, |
||
25 | \Illuminate\Validation\ValidationException::class, |
||
26 | */ |
||
27 | ]; |
||
28 | |||
29 | /** |
||
30 | * A list of the inputs that are never flashed for validation exceptions. |
||
31 | * @var array |
||
32 | */ |
||
33 | protected $dontFlash = [ |
||
34 | 'password', |
||
35 | 'password_confirmation', |
||
36 | ]; |
||
37 | |||
38 | /** |
||
39 | * Report or log an exception. |
||
40 | * |
||
41 | * This is a great spot to send exceptions to Sentry, Bugsnag, etc. |
||
42 | * |
||
43 | * @param \Exception $exception |
||
44 | */ |
||
45 | 1 | public function report(Exception $exception) |
|
49 | |||
50 | /** |
||
51 | * Render an exception into an HTTP response. |
||
52 | * |
||
53 | * @param \Illuminate\Http\Request $request |
||
54 | * @param \Exception $exception |
||
55 | * |
||
56 | * @return \Illuminate\Http\Response |
||
57 | */ |
||
58 | 1 | public function render($request, Exception $exception) |
|
86 | |||
87 | /** |
||
88 | * Convert a validation exception into a JSON response. |
||
89 | * |
||
90 | * @param \Illuminate\Http\Request $request |
||
91 | * @param \Illuminate\Validation\ValidationException $exception |
||
92 | * @return \Illuminate\Http\JsonResponse |
||
93 | */ |
||
94 | protected function invalidJson($request, ValidationException $exception) |
||
98 | |||
99 | /** |
||
100 | * Convert an authentication exception into an unauthenticated response. |
||
101 | * |
||
102 | * @param \Illuminate\Http\Request $request |
||
103 | * @param \Illuminate\Auth\AuthenticationException $exception |
||
104 | * @return \Illuminate\Http\Response |
||
105 | */ |
||
106 | protected function unauthenticated($request, AuthenticationException $exception) |
||
116 | |||
117 | |||
118 | } |
||
119 |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: