@@ 92-96 (lines=5) @@ | ||
89 | */ |
|
90 | private function hydrateNode($node, Schema $schema) |
|
91 | { |
|
92 | if ($schema instanceof ArraySchema) { |
|
93 | return array_map(function ($value) use ($schema) { |
|
94 | return $this->hydrateNode($value, $schema->getItemsSchema()); |
|
95 | }, $node); |
|
96 | } |
|
97 | if ($schema instanceof ObjectSchema) { |
|
98 | if (!$schema->hasComplexType()) { |
|
99 | $object = clone $node; |
|
@@ 145-149 (lines=5) @@ | ||
142 | return $this->dateTimeSerializer->serialize($node, $schema); |
|
143 | } |
|
144 | if ($this->shouldTreatAsArray($node, $schema)) { |
|
145 | if ($schema instanceof ArraySchema) { |
|
146 | return array_map(function ($value) use ($schema) { |
|
147 | return $this->dehydrateNode($value, $schema->getItemsSchema()); |
|
148 | }, $node); |
|
149 | } |
|
150 | ||
151 | return array_map(function ($value) { |
|
152 | return $this->dehydrateNode($value, $this->anySchema); |