| Conditions | 3 |
| Paths | 3 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | 15 | private function prepareRules(array $data, array $allRules, array $optionalFields, bool $strict): array |
|
| 33 | { |
||
| 34 | 15 | $rules = []; |
|
| 35 | 15 | foreach ($allRules as $field => $fieldRules) { |
|
| 36 | 15 | if ($this->useRule($field, $data, $optionalFields, $strict)) { |
|
| 37 | 10 | $rules[$field] = $fieldRules; |
|
| 38 | } |
||
| 39 | } |
||
| 40 | 15 | return $rules; |
|
| 41 | } |
||
| 53 |