We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Conditions | 6 |
Paths | 9 |
Total Lines | 20 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 6.0359 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
42 | 2 | ||
43 | /** |
||
44 | 2 | * {@inheritdoc} |
|
45 | */ |
||
46 | 2 | public function validate($input): Result |
|
47 | 1 | { |
|
48 | $isValid = false; |
||
49 | 2 | $childrenResults = []; |
|
50 | 2 | foreach ($this->rules as $rule) { |
|
51 | 2 | $childResult = $rule->validate($input); |
|
52 | |||
53 | $isValid = $childResult->isValid() || $isValid; |
||
54 | $childrenResults[] = $childResult; |
||
55 | } |
||
56 | 1 | ||
57 | 1 | return new Result($isValid, $input, $this, [], ...$childrenResults); |
|
58 | } |
||
59 | } |
||
60 |