| Total Complexity | 6 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class ValidCartNumberIran implements ValidationRule |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Check cart number is valid. |
||
| 12 | * |
||
| 13 | * @param string $attribute |
||
| 14 | * @param mixed $value |
||
| 15 | * @param Closure $fail |
||
| 16 | * @return void |
||
| 17 | */ |
||
| 18 | public function validate(string $attribute, mixed $value, Closure $fail): void |
||
| 19 | { |
||
| 20 | if (! $this->isCartNumberValid($value)) { |
||
| 21 | |||
| 22 | $fail('validate.cart-number-iran')->translate(); |
||
| 23 | } |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Check if cart number is valid |
||
| 28 | * |
||
| 29 | * @param string $value |
||
| 30 | * @return bool |
||
| 31 | */ |
||
| 32 | private function isCartNumberValid(mixed $value): bool |
||
| 46 | } |
||
| 47 | } |
||
| 48 |
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