|
@@ 50-57 (lines=8) @@
|
| 47 |
|
// Add schema of all children up to root |
| 48 |
|
$descend = function (ComplexType $complexType) use (&$descend, $builder, $processor) { |
| 49 |
|
|
| 50 |
|
foreach ($complexType->getSchema()->getPropertySchemas() as $propertyName => $propertySchema) { |
| 51 |
|
if ($propertySchema instanceof ObjectSchema && $propertySchema->getXType() !== null && !$propertySchema->hasComplexType()) { |
| 52 |
|
throw new \LogicException("ComplexType never resolved"); |
| 53 |
|
} |
| 54 |
|
$propertyProcessor = $builder->build($propertySchema); |
| 55 |
|
|
| 56 |
|
$processor->setPropertyProcessor($propertyName, $propertyProcessor); |
| 57 |
|
} |
| 58 |
|
|
| 59 |
|
foreach ($complexType->getChildren() as $child) { |
| 60 |
|
$descend($child); |
|
@@ 68-75 (lines=8) @@
|
| 65 |
|
} |
| 66 |
|
|
| 67 |
|
|
| 68 |
|
foreach ($objectSchema->getPropertySchemas() as $propertyName => $propertySchema) { |
| 69 |
|
if ($propertySchema instanceof ObjectSchema && $propertySchema->getXType() !== null && !$propertySchema->hasComplexType()) { |
| 70 |
|
throw new \LogicException("ComplexType never resolved"); |
| 71 |
|
} |
| 72 |
|
$propertyProcessor = $builder->build($propertySchema); |
| 73 |
|
|
| 74 |
|
$processor->setPropertyProcessor($propertyName, $propertyProcessor); |
| 75 |
|
} |
| 76 |
|
|
| 77 |
|
return $processor; |
| 78 |
|
} |