| @@ 92-98 (lines=7) @@ | ||
| 89 | foreach ($mapping->getParameters() as $parameter => $value) { |
|
| 90 | $target[$parameter] = $value; |
|
| 91 | } |
|
| 92 | if (!empty($mapping->getProperties())) { |
|
| 93 | $properties = []; |
|
| 94 | foreach ($mapping->getProperties() as $property => $mapping) { |
|
| 95 | $properties[$property] = static::toArray($mapping); |
|
| 96 | } |
|
| 97 | $target[self::KEY_PROPERTIES] = $properties; |
|
| 98 | } |
|
| 99 | if ($mapping->getType()) { |
|
| 100 | $target[self::KEY_TYPE] = $mapping->getType(); |
|
| 101 | } |
|
| @@ 111-117 (lines=7) @@ | ||
| 108 | foreach ($mapping->getParameters() as $parameter => $value) { |
|
| 109 | $target->$parameter = $value; |
|
| 110 | } |
|
| 111 | if (!empty($mapping->getProperties())) { |
|
| 112 | $properties = []; |
|
| 113 | foreach ($mapping->getProperties() as $name => $property) { |
|
| 114 | $properties[$name] = static::toStdObject($property); |
|
| 115 | } |
|
| 116 | $target->properties = $properties; |
|
| 117 | } |
|
| 118 | if ($mapping->getType()) { |
|
| 119 | $target->type = $mapping->getType(); |
|
| 120 | } |
|