@@ -100,8 +100,7 @@ discard block |
||
| 100 | 100 | // full yet, so load it first and repeat the operation. |
| 101 | 101 | if (method_exists($this, 'load' . ucfirst($name))) { |
| 102 | 102 | $this->{'load' . ucfirst($name)}(); |
| 103 | - } |
|
| 104 | - else { |
|
| 103 | + } else { |
|
| 105 | 104 | $this->load(); |
| 106 | 105 | } |
| 107 | 106 | return $this->get($name); |
@@ -136,8 +135,7 @@ discard block |
||
| 136 | 135 | $this->_raw->{$prop} = $val; |
| 137 | 136 | if (method_exists($val, 'raw')) { |
| 138 | 137 | $this->_raw->{$prop} = $val->raw(); |
| 139 | - } |
|
| 140 | - elseif (is_array($val)) { |
|
| 138 | + } elseif (is_array($val)) { |
|
| 141 | 139 | $this->_raw->{$prop} = array(); |
| 142 | 140 | foreach ($val as $v) { |
| 143 | 141 | $this->_raw->{$prop}[] = method_exists($v, 'raw') ? $v->raw() : $v; |
@@ -57,16 +57,14 @@ |
||
| 57 | 57 | $reflection = new \ReflectionClass($this->entityManager->getClass($entityType)); |
| 58 | 58 | if ($mapProperties) { |
| 59 | 59 | $givenProperties = $this->entityManager->mapProperties($values, $entityType); |
| 60 | - } |
|
| 61 | - else { |
|
| 60 | + } else { |
|
| 62 | 61 | $givenProperties = $values; |
| 63 | 62 | } |
| 64 | 63 | // Not all properties are loaded, return a proxy. |
| 65 | 64 | if (!$this->isFullObject($givenProperties, $entityType)) { |
| 66 | 65 | $proxyReflection = new \ReflectionClass($this->entityManager->getClass($entityType, 'proxy')); |
| 67 | 66 | $entity = $proxyReflection->newInstance($givenProperties); |
| 68 | - } |
|
| 69 | - else { |
|
| 67 | + } else { |
|
| 70 | 68 | // All properties are loaded, return a full object. |
| 71 | 69 | $entity = $reflection->newInstance($givenProperties); |
| 72 | 70 | } |
@@ -47,8 +47,7 @@ |
||
| 47 | 47 | $this->_raw->{$prop} = $val; |
| 48 | 48 | if (method_exists($val, 'raw')) { |
| 49 | 49 | $this->_raw->{$prop} = $val->raw(); |
| 50 | - } |
|
| 51 | - elseif (is_array($val)) { |
|
| 50 | + } elseif (is_array($val)) { |
|
| 52 | 51 | $this->_raw->{$prop} = array(); |
| 53 | 52 | foreach ($val as $v) { |
| 54 | 53 | $this->_raw->{$prop}[] = method_exists($v, 'raw') ? $v->raw() : $v; |
@@ -77,8 +77,7 @@ |
||
| 77 | 77 | if (isset($this->repository[$mapped->id])) { |
| 78 | 78 | $entity = $this->repository[$mapped->id]; |
| 79 | 79 | $entity->update($mapped); |
| 80 | - } |
|
| 81 | - else { |
|
| 80 | + } else { |
|
| 82 | 81 | $factory = $this->entityManager->factory($this->getEntityTypeName()); |
| 83 | 82 | $this->repository[$mapped->id] = $factory->create($mapped, $this->getEntityTypeName(), FALSE); |
| 84 | 83 | } |
@@ -77,8 +77,7 @@ |
||
| 77 | 77 | if (isset($this->repository[$mapped->id])) { |
| 78 | 78 | $entity = $this->repository[$mapped->id]; |
| 79 | 79 | $entity->update($mapped); |
| 80 | - } |
|
| 81 | - else { |
|
| 80 | + } else { |
|
| 82 | 81 | $factory = $this->entityManager->factory($this->getEntityTypeName()); |
| 83 | 82 | $this->repository[$mapped->id] = $factory->create($mapped, $this->getEntityTypeName(), FALSE); |
| 84 | 83 | } |
@@ -77,8 +77,7 @@ |
||
| 77 | 77 | if (isset($this->repository[$mapped->id])) { |
| 78 | 78 | $entity = $this->repository[$mapped->id]; |
| 79 | 79 | $entity->update($mapped); |
| 80 | - } |
|
| 81 | - else { |
|
| 80 | + } else { |
|
| 82 | 81 | $factory = $this->entityManager->factory($this->getEntityTypeName()); |
| 83 | 82 | $this->repository[$mapped->id] = $factory->create($mapped, $this->getEntityTypeName(), FALSE); |
| 84 | 83 | } |