We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 46 | 29 | public function apply($input): Result |
|
| 47 | { |
||
| 48 | 29 | $isValid = !empty($this->rules); |
|
| 49 | 29 | $childrenResults = []; |
|
| 50 | 29 | foreach ($this->rules as $rule) { |
|
| 51 | 25 | $childResult = $rule->apply($input); |
|
| 52 | 25 | $isValid = $isValid && $childResult->isValid(); |
|
| 53 | 25 | $childrenResults[] = $childResult; |
|
| 54 | } |
||
| 55 | |||
| 56 | 29 | return new Result($isValid, $input, $this, [], ...$childrenResults); |
|
| 57 | } |
||
| 58 | } |
||
| 59 |