@@ -115,8 +115,7 @@ discard block |
||
| 115 | 115 | foreach ($relationships as $relationshipName => $relationship) { |
| 116 | 116 | if (null === $relationship) { |
| 117 | 117 | $output[$relationshipName] = $this->isMapped($relationshipName) ? $this->convertValueType($relationshipName, null) : null; |
| 118 | - } |
|
| 119 | - else if (true === $relationship instanceof Collection) { |
|
| 118 | + } else if (true === $relationship instanceof Collection) { |
|
| 120 | 119 | // do not transform empty relationships |
| 121 | 120 | if ($relationship->isEmpty()) { |
| 122 | 121 | continue; |
@@ -127,8 +126,7 @@ discard block |
||
| 127 | 126 | } else { |
| 128 | 127 | $output[$relationshipName] = $relationship->toArray(); |
| 129 | 128 | } |
| 130 | - } |
|
| 131 | - else { |
|
| 129 | + } else { |
|
| 132 | 130 | // model |
| 133 | 131 | if ($this->isTransformAware($relationship)) { |
| 134 | 132 | $output[$relationshipName] = $relationship->getTransformer()->transformOutput($relationship); |