Conditions | 4 |
Paths | 4 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
32 | private function isCartNumberValid(mixed $value): bool |
||
33 | { |
||
34 | $cardToArr = str_split($value); |
||
35 | $cardTotal = 0; |
||
36 | for ($i = 0; $i < 16; $i++) { |
||
37 | $c = (int) $cardToArr[$i]; |
||
38 | if ($i % 2 === 0) { |
||
39 | $cardTotal += (($c * 2 > 9) ? ($c * 2) - 9 : ($c * 2)); |
||
40 | } else { |
||
41 | $cardTotal += $c; |
||
42 | } |
||
43 | } |
||
44 | |||
45 | return $cardTotal % 10 === 0; |
||
46 | } |
||
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