Accessing verified on the interface Illuminate\Contracts\Auth\Authenticatable suggest that you code against a concrete implementation. How about adding an instanceof check?
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 ignore-call annotation
21
if (Auth::user()->/** @scrutinizer ignore-call */ isStudent() && ! Auth::user()->verified) {
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.