Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
20 | public function handle($request, Closure $next, $guard = null) |
||
21 | { |
||
22 | if (auth()->guard($guard)->guest()) { |
||
|
|||
23 | return intend([ |
||
24 | 'url' => route('frontarea.login'), |
||
25 | 'with' => ['warning' => trans('cortex/foundation::messages.session_required')], |
||
26 | ]); |
||
27 | } |
||
28 | |||
29 | return $next($request); |
||
30 | } |
||
31 | } |
||
32 |
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: