@@ -56,8 +56,7 @@ |
||
| 56 | 56 | if (!isset($this->properties->leagues[$league->getId()])) { |
| 57 | 57 | $this->properties->leagues[$league->getId()] = $league; |
| 58 | 58 | } |
| 59 | - } |
|
| 60 | - else { |
|
| 59 | + } else { |
|
| 61 | 60 | $this->entity->addLeague($league); |
| 62 | 61 | } |
| 63 | 62 | } |
@@ -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 | } |
@@ -171,8 +171,7 @@ |
||
| 171 | 171 | static $cache = array(); |
| 172 | 172 | if (isset($cache[$entityType][$values->id])) { |
| 173 | 173 | $reversed = $cache[$entityType][$values->id]; |
| 174 | - } |
|
| 175 | - else { |
|
| 174 | + } else { |
|
| 176 | 175 | $reversed = new \stdClass(); |
| 177 | 176 | $cache[$entityType][$values->id] = &$reversed; |
| 178 | 177 | } |
@@ -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 | } |