Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | 128 | public function handle(Request $request, Closure $next) |
|
22 | { |
||
23 | 128 | $countries = config()->get('geo-routes.global.countries'); |
|
24 | 128 | $strategy = config()->get('geo-routes.global.strategy'); |
|
25 | |||
26 | 128 | if (!$this->shouldHaveAccess($countries, $strategy)) { |
|
27 | 16 | abort(401); |
|
28 | } |
||
29 | |||
30 | 112 | return $next($request); |
|
31 | } |
||
33 |