1 | <?php |
||||
2 | |||||
3 | namespace App\Http\Middleware; |
||||
4 | |||||
5 | use Closure; |
||||
6 | use Illuminate\Support\Facades\Auth; |
||||
7 | |||||
8 | class ShowStudentVerificationIsRequired |
||||
9 | { |
||||
10 | /** |
||||
11 | * Handle an incoming request. |
||||
12 | * |
||||
13 | * @param \Illuminate\Http\Request $request |
||||
14 | * @param \Closure $next |
||||
15 | * @param string|null $guard |
||||
16 | * |
||||
17 | * @return mixed |
||||
18 | */ |
||||
19 | public function handle($request, Closure $next, $guard = null) |
||||
0 ignored issues
–
show
|
|||||
20 | { |
||||
21 | if (Auth::user()->isStudent() && ! Auth::user()->verified) { |
||||
0 ignored issues
–
show
The method
isStudent() does not exist on Illuminate\Contracts\Auth\Authenticatable . It seems like you code against a sub-type of Illuminate\Contracts\Auth\Authenticatable such as Illuminate\Foundation\Auth\User .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
22 | return response(view('auth.unconfirmed'), 403); |
||||
23 | } |
||||
24 | |||||
25 | return $next($request); |
||||
26 | } |
||||
27 | } |
||||
28 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.