| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | 3 | public static function validate($data, $parameter, SubSchemaValidatorFactory $validatorFactory, $pointer = null) |
|
| 13 | { |
||
| 14 | 3 | if (!is_array($parameter)) { |
|
| 15 | 1 | return null; |
|
| 16 | } |
||
| 17 | |||
| 18 | 2 | $errors = []; |
|
| 19 | |||
| 20 | 2 | foreach ($parameter as $schema) { |
|
| 21 | 2 | $validator = $validatorFactory->makeSubSchemaValidator($data, $schema, $pointer); |
|
| 22 | 2 | $errors = array_merge($errors, $validator->errors()); |
|
| 23 | 2 | } |
|
| 24 | |||
| 25 | 2 | return $errors; |
|
| 26 | } |
||
| 27 | } |
||
| 28 |