| Total Complexity | 3 |
| Total Lines | 23 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | trait DeterminesGeoAccess |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Determine if the request should be allowed through. |
||
| 12 | * |
||
| 13 | * @param \Illuminate\Http\Request $request |
||
| 14 | * @param array $countries |
||
| 15 | * @param string $strategy |
||
| 16 | * @return bool |
||
| 17 | */ |
||
| 18 | 80 | protected function shouldHaveAccess(Request $request, array $countries, string $strategy) |
|
| 33 |
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using
empty(..)or! empty(...)instead.