| Total Complexity | 3 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | class Two implements Rule |
||
| 12 | { |
||
| 13 | |||
| 14 | /** |
||
| 15 | * Determine if the validation rule passes. |
||
| 16 | * |
||
| 17 | * @param string $attribute |
||
| 18 | * @param mixed $value |
||
| 19 | * |
||
| 20 | * @return bool |
||
| 21 | */ |
||
| 22 | 1 | public function passes($attribute, $value) |
|
| 23 | { |
||
| 24 | try { |
||
| 25 | 1 | (new ISO3166)->alpha2($value); |
|
| 26 | |||
| 27 | 1 | return true; |
|
| 28 | 1 | } catch (DomainException | InvalidArgumentException | OutOfBoundsException $exception) { |
|
| 29 | 1 | return false; |
|
| 30 | } |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Get the validation error message. |
||
| 35 | * |
||
| 36 | * @return string |
||
| 37 | */ |
||
| 38 | 1 | public function message() |
|
| 41 | } |
||
| 42 | } |
||
| 43 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths