We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Conditions | 5 |
Paths | 6 |
Total Lines | 20 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 5 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
49 | 5 | $childrenResults = []; |
|
50 | foreach ($this->rules as $key => $rule) { |
||
51 | 5 | $childResult = $rule->validate($input); |
|
52 | 5 | ||
53 | 5 | $childrenResults[$key] = $childResult; |
|
54 | |||
55 | 4 | if (!$childResult->isValid()) { |
|
56 | continue; |
||
57 | 3 | } |
|
58 | 3 | ||
59 | 3 | if ($validCount >= 1) { |
|
60 | $childrenResults[$key] = $childResult->invert(); |
||
61 | } |
||
62 | |||
63 | 5 | ++$validCount; |
|
64 | 1 | } |
|
65 | |||
66 | return new Result(($validCount === 1), $input, $this, [], ...$childrenResults); |
||
67 | 4 | } |
|
68 | } |
||
69 |