1 | <?php |
||||
2 | |||||
3 | namespace App\Exceptions; |
||||
4 | |||||
5 | use Exception; |
||||
6 | use Illuminate\Support\Facades\Lang; |
||||
7 | |||||
8 | class TwoFactorRequiredException extends Exception |
||||
9 | { |
||||
10 | /** |
||||
11 | * Render the exception into an HTTP response. |
||||
12 | * |
||||
13 | * @param \Illuminate\Http\Request $request Incoming request object. |
||||
14 | * @return \Illuminate\Http\Response|\Illuminate\Contracts\Routing\ResponseFactory |
||||
15 | */ |
||||
16 | public function render(\Illuminate\Http\Request $request) |
||||
0 ignored issues
–
show
|
|||||
17 | { |
||||
18 | return response()->view( |
||||
0 ignored issues
–
show
The function
response was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
19 | 'errors/two_factor_required', |
||||
20 | [ |
||||
21 | 'exception' => $this, |
||||
22 | 'error' => [ |
||||
23 | 'title' => Lang::get('errors.title'), |
||||
24 | ], |
||||
25 | ], |
||||
26 | $this->getStatusCode() |
||||
27 | ); |
||||
28 | } |
||||
29 | |||||
30 | /** |
||||
31 | * Override, custom exception doesn't return a status code. |
||||
32 | * |
||||
33 | * @return mixed |
||||
34 | */ |
||||
35 | public function getStatusCode() |
||||
36 | { |
||||
37 | return 403; |
||||
38 | } |
||||
39 | } |
||||
40 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.