src/Constraint/AbstractOfConstraint.php 1 location
|
@@ 49-58 (lines=10) @@
|
| 46 |
|
throw new EmptyArrayException($context); |
| 47 |
|
} |
| 48 |
|
|
| 49 |
|
foreach ($schema->{$keyword} as $index => $subSchema) { |
| 50 |
|
$context->enterNode($index); |
| 51 |
|
|
| 52 |
|
if (!is_object($subSchema)) { |
| 53 |
|
throw new InvalidTypeException($context, Types::TYPE_OBJECT); |
| 54 |
|
} |
| 55 |
|
|
| 56 |
|
$walker->parseSchema($subSchema, $context); |
| 57 |
|
$context->leaveNode(); |
| 58 |
|
} |
| 59 |
|
|
| 60 |
|
$context->leaveNode(); |
| 61 |
|
} |
src/Constraint/ItemsConstraint.php 1 location
|
@@ 110-119 (lines=10) @@
|
| 107 |
|
if (is_object($schema->items)) { |
| 108 |
|
$walker->parseSchema($schema->items, $context); |
| 109 |
|
} elseif (is_array($schema->items)) { |
| 110 |
|
foreach ($schema->items as $index => $item) { |
| 111 |
|
$context->enterNode($index); |
| 112 |
|
|
| 113 |
|
if (!is_object($item)) { |
| 114 |
|
throw new InvalidTypeException($context, Types::TYPE_OBJECT); |
| 115 |
|
} |
| 116 |
|
|
| 117 |
|
$walker->parseSchema($item, $context); |
| 118 |
|
$context->leaveNode(); |
| 119 |
|
} |
| 120 |
|
} else { |
| 121 |
|
throw new InvalidTypeException($context, [Types::TYPE_OBJECT, Types::TYPE_ARRAY]); |
| 122 |
|
} |
src/Constraint/PropertiesConstraint.php 1 location
|
@@ 120-129 (lines=10) @@
|
| 117 |
|
throw new InvalidTypeException($context, Types::TYPE_OBJECT); |
| 118 |
|
} |
| 119 |
|
|
| 120 |
|
foreach ($schema->properties as $property => $value) { |
| 121 |
|
$context->enterNode($property); |
| 122 |
|
|
| 123 |
|
if (!is_object($value)) { |
| 124 |
|
throw new InvalidTypeException($context, Types::TYPE_OBJECT); |
| 125 |
|
} |
| 126 |
|
|
| 127 |
|
$walker->parseSchema($value, $context); |
| 128 |
|
$context->leaveNode(); |
| 129 |
|
} |
| 130 |
|
} |
| 131 |
|
|
| 132 |
|
private function parseAdditionalPropertiesProperty(stdClass $schema, Context $context, Walker $walker) |