@@ -35,8 +35,7 @@ discard block |
||
| 35 | 35 | { |
| 36 | 36 | if (is_string($entity) && class_exists($entity)) { |
| 37 | 37 | $entity = new $entity; |
| 38 | - } |
|
| 39 | - elseif (!is_object($entity)) { |
|
| 38 | + } elseif (!is_object($entity)) { |
|
| 40 | 39 | throw new Exception('Entity passed to ArrayHydrator::hydrate() must be a class name or entity object'); |
| 41 | 40 | } |
| 42 | 41 | |
@@ -130,8 +129,7 @@ discard block |
||
| 130 | 129 | foreach ($values as $value) { |
| 131 | 130 | if (is_array($value)) { |
| 132 | 131 | $assocationObjects[] = $this->hydrate($mapping['targetEntity'], $value); |
| 133 | - } |
|
| 134 | - elseif ($associationObject = $this->fetchAssociationEntity($mapping['targetEntity'], $value)) { |
|
| 132 | + } elseif ($associationObject = $this->fetchAssociationEntity($mapping['targetEntity'], $value)) { |
|
| 135 | 133 | $assocationObjects[] = $associationObject; |
| 136 | 134 | } |
| 137 | 135 | } |