| Conditions | 4 |
| Paths | 4 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | public function handle($request, Closure $next, $guard = null) |
||
|
|
|||
| 19 | { |
||
| 20 | if (auth()->guard('hideyobackend')->guest()) { |
||
| 21 | if ($request->ajax()) { |
||
| 22 | return response('Unauthorized.', 401); |
||
| 23 | } |
||
| 24 | |||
| 25 | return redirect()->guest('/admin/security/login'); |
||
| 26 | } |
||
| 27 | |||
| 28 | if (auth()->guard('hideyobackend')->check()) { |
||
| 29 | view()->share('this_user', auth()->guard('hideyobackend')->user()); |
||
| 30 | view()->share('available_shops', ShopService::selectAll()); |
||
| 31 | } |
||
| 32 | |||
| 33 | return $next($request); |
||
| 34 | } |
||
| 35 | } |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.