| Conditions | 3 | 
| Paths | 3 | 
| Total Lines | 11 | 
| Code Lines | 5 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 0 | 
| CRAP Score | 12 | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 52 | public function handle($request, Closure $next)  | 
            ||
| 53 |     { | 
            ||
| 54 |         if (backpack_auth()->guest()) { | 
            ||
| 55 | return $this->respondToUnauthorizedRequest($request);  | 
            ||
| 56 | }  | 
            ||
| 57 | |||
| 58 |         if (!$this->checkIfUserIsAdmin(backpack_user())) { | 
            ||
| 59 | return $this->respondToUnauthorizedRequest($request);  | 
            ||
| 60 | }  | 
            ||
| 61 | |||
| 62 | return $next($request);  | 
            ||
| 63 | }  | 
            ||
| 65 |