| Total Complexity | 6 |
| Total Lines | 51 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class GeoRoutesMiddleware |
||
| 10 | { |
||
| 11 | use DeterminesGeoAccess; |
||
|
|
|||
| 12 | |||
| 13 | protected $countries; |
||
| 14 | protected $strategy; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Handle an incoming request. |
||
| 18 | * |
||
| 19 | * @param \Illuminate\Http\Request $request |
||
| 20 | * @param \Closure $next |
||
| 21 | 9 | * @param string $strategy |
|
| 22 | * @param string $countries |
||
| 23 | 9 | * @param string|null $callback |
|
| 24 | * @return mixed |
||
| 25 | 9 | */ |
|
| 26 | 3 | public function handle(Request $request, Closure $next, string $strategy, string $countries, string $callback = null) |
|
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Get the countries. |
||
| 44 | 9 | * |
|
| 45 | * @return string[] |
||
| 46 | 9 | */ |
|
| 47 | public function getCountries() |
||
| 48 | 9 | { |
|
| 49 | 6 | return $this->countries; |
|
| 50 | } |
||
| 51 | |||
| 52 | 3 | /** |
|
| 53 | * Get the strategy. |
||
| 54 | * |
||
| 55 | * @return string |
||
| 56 | */ |
||
| 57 | public function getStrategy() |
||
| 60 | } |
||
| 61 | } |
||
| 62 |