| Conditions | 4 |
| Paths | 4 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | public function hydrate(AnnotationInterface $annotation, array $json, ResourceInterface $object): array |
||
| 14 | { |
||
| 15 | if (!($annotation instanceof Nested)) { |
||
| 16 | return $json; |
||
| 17 | } |
||
| 18 | |||
| 19 | foreach ($annotation->properties() as $property) { |
||
| 20 | if ($json[$property] === null) { |
||
| 21 | continue; |
||
| 22 | } |
||
| 23 | |||
| 24 | $json[$property] = $this->getHydrator()->hydrate($annotation->get($property), $json[$property]); |
||
| 25 | } |
||
| 26 | |||
| 27 | return $json; |
||
| 28 | } |
||
| 29 | |||
| 43 |