@@ 310-313 (lines=4) @@ | ||
307 | $input = [sprintf('type|is_string|%s', BaseValidator::STRING)]; |
|
308 | ||
309 | // it is now possible that property type can both a string or an array |
|
310 | if (isset($schema->type) && is_array($schema->type)) { |
|
311 | ||
312 | $input = [sprintf('type|is_array|%s', BaseValidator::_ARRAY)]; |
|
313 | } |
|
314 | ||
315 | if (isset($schema->type) && $schema->type === BaseValidator::_ARRAY) { |
|
316 | ||
@@ 315-321 (lines=7) @@ | ||
312 | $input = [sprintf('type|is_array|%s', BaseValidator::_ARRAY)]; |
|
313 | } |
|
314 | ||
315 | if (isset($schema->type) && $schema->type === BaseValidator::_ARRAY) { |
|
316 | ||
317 | // field|must_be|type_in_error_msg |
|
318 | $input = array_merge($input, [ |
|
319 | sprintf('items|is_object|%s', BaseValidator::OBJECT) |
|
320 | ]); |
|
321 | } |
|
322 | ||
323 | return $this->validateSchemaProperties($input, $schema, $path, true); |
|
324 | } |