| Conditions | 4 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | 3 | public function handle(Request $request, Closure $next, string $strategy, string $countries, string $callback = null) |
|
| 27 | { |
||
| 28 | $this->countries = explode('&', $countries); |
||
| 29 | 6 | $this->strategy = $strategy; |
|
| 30 | 3 | ||
| 31 | if ($this->shouldHaveAccess($request)) { |
||
| 32 | return $next($request); |
||
| 33 | 3 | } |
|
| 34 | |||
| 35 | if ($callback && $callback = unserialize($callback)) { |
||
| 36 | return call_user_func_array($callback[0], $callback[1] ?? []); |
||
| 37 | } |
||
| 38 | |||
| 39 | return abort(401); |
||
| 40 | } |
||
| 62 |