@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\ORM\Internal\Hydration; |
| 6 | 6 | |
@@ -92,10 +92,10 @@ discard block |
||
| 92 | 92 | // It's a joined result |
| 93 | 93 | |
| 94 | 94 | $parent = $this->rsm->parentAliasMap[$dqlAlias]; |
| 95 | - $path = $parent . '.' . $dqlAlias; |
|
| 95 | + $path = $parent.'.'.$dqlAlias; |
|
| 96 | 96 | |
| 97 | 97 | // missing parent data, skipping as RIGHT JOIN hydration is not supported. |
| 98 | - if (! isset($nonemptyComponents[$parent])) { |
|
| 98 | + if ( ! isset($nonemptyComponents[$parent])) { |
|
| 99 | 99 | continue; |
| 100 | 100 | } |
| 101 | 101 | |
@@ -104,9 +104,9 @@ discard block |
||
| 104 | 104 | if ($this->rsm->isMixed && isset($this->rootAliases[$parent])) { |
| 105 | 105 | $first = reset($this->resultPointers); |
| 106 | 106 | // TODO: Exception if $key === null ? |
| 107 | - $baseElement =& $this->resultPointers[$parent][key($first)]; |
|
| 107 | + $baseElement = & $this->resultPointers[$parent][key($first)]; |
|
| 108 | 108 | } elseif (isset($this->resultPointers[$parent])) { |
| 109 | - $baseElement =& $this->resultPointers[$parent]; |
|
| 109 | + $baseElement = & $this->resultPointers[$parent]; |
|
| 110 | 110 | } else { |
| 111 | 111 | unset($this->resultPointers[$dqlAlias]); // Ticket #1228 |
| 112 | 112 | |
@@ -118,10 +118,10 @@ discard block |
||
| 118 | 118 | $relation = $parentClass->getProperty($relationAlias); |
| 119 | 119 | |
| 120 | 120 | // Check the type of the relation (many or single-valued) |
| 121 | - if (! $relation instanceof ToOneAssociationMetadata) { |
|
| 121 | + if ( ! $relation instanceof ToOneAssociationMetadata) { |
|
| 122 | 122 | $oneToOne = false; |
| 123 | 123 | |
| 124 | - if (! isset($baseElement[$relationAlias])) { |
|
| 124 | + if ( ! isset($baseElement[$relationAlias])) { |
|
| 125 | 125 | $baseElement[$relationAlias] = []; |
| 126 | 126 | } |
| 127 | 127 | |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | $index = $indexExists ? $this->identifierMap[$path][$id[$parent]][$id[$dqlAlias]] : false; |
| 131 | 131 | $indexIsValid = $index !== false ? isset($baseElement[$relationAlias][$index]) : false; |
| 132 | 132 | |
| 133 | - if (! $indexExists || ! $indexIsValid) { |
|
| 133 | + if ( ! $indexExists || ! $indexIsValid) { |
|
| 134 | 134 | $element = $data; |
| 135 | 135 | |
| 136 | 136 | if (isset($this->rsm->indexByMap[$dqlAlias])) { |
@@ -151,12 +151,12 @@ discard block |
||
| 151 | 151 | ( ! isset($baseElement[$relationAlias])) |
| 152 | 152 | ) { |
| 153 | 153 | $baseElement[$relationAlias] = null; |
| 154 | - } elseif (! isset($baseElement[$relationAlias])) { |
|
| 154 | + } elseif ( ! isset($baseElement[$relationAlias])) { |
|
| 155 | 155 | $baseElement[$relationAlias] = $data; |
| 156 | 156 | } |
| 157 | 157 | } |
| 158 | 158 | |
| 159 | - $coll =& $baseElement[$relationAlias]; |
|
| 159 | + $coll = & $baseElement[$relationAlias]; |
|
| 160 | 160 | |
| 161 | 161 | if (is_array($coll)) { |
| 162 | 162 | $this->updateResultPointer($coll, $index, $dqlAlias, $oneToOne); |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | $entityKey = $this->rsm->entityMappings[$dqlAlias] ?: 0; |
| 169 | 169 | |
| 170 | 170 | // if this row has a NULL value for the root result id then make it a null result. |
| 171 | - if (! isset($nonemptyComponents[$dqlAlias])) { |
|
| 171 | + if ( ! isset($nonemptyComponents[$dqlAlias])) { |
|
| 172 | 172 | $result[] = $this->rsm->isMixed |
| 173 | 173 | ? [$entityKey => null] |
| 174 | 174 | : null; |
@@ -205,13 +205,13 @@ discard block |
||
| 205 | 205 | } |
| 206 | 206 | } |
| 207 | 207 | |
| 208 | - if (! isset($resultKey)) { |
|
| 208 | + if ( ! isset($resultKey)) { |
|
| 209 | 209 | $this->resultCounter++; |
| 210 | 210 | } |
| 211 | 211 | |
| 212 | 212 | // Append scalar values to mixed result sets |
| 213 | 213 | if (isset($rowData['scalars'])) { |
| 214 | - if (! isset($resultKey)) { |
|
| 214 | + if ( ! isset($resultKey)) { |
|
| 215 | 215 | // this only ever happens when no object is fetched (scalar result only) |
| 216 | 216 | $resultKey = isset($this->rsm->indexByMap['scalars']) |
| 217 | 217 | ? $row[$this->rsm->indexByMap['scalars']] |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | |
| 226 | 226 | // Append new object to mixed result sets |
| 227 | 227 | if (isset($rowData['newObjects'])) { |
| 228 | - if (! isset($resultKey)) { |
|
| 228 | + if ( ! isset($resultKey)) { |
|
| 229 | 229 | $resultKey = $this->resultCounter - 1; |
| 230 | 230 | } |
| 231 | 231 | |
@@ -267,22 +267,22 @@ discard block |
||
| 267 | 267 | } |
| 268 | 268 | |
| 269 | 269 | if ($oneToOne) { |
| 270 | - $this->resultPointers[$dqlAlias] =& $coll; |
|
| 270 | + $this->resultPointers[$dqlAlias] = & $coll; |
|
| 271 | 271 | |
| 272 | 272 | return; |
| 273 | 273 | } |
| 274 | 274 | |
| 275 | 275 | if ($index !== false) { |
| 276 | - $this->resultPointers[$dqlAlias] =& $coll[$index]; |
|
| 276 | + $this->resultPointers[$dqlAlias] = & $coll[$index]; |
|
| 277 | 277 | |
| 278 | 278 | return; |
| 279 | 279 | } |
| 280 | 280 | |
| 281 | - if (! $coll) { |
|
| 281 | + if ( ! $coll) { |
|
| 282 | 282 | return; |
| 283 | 283 | } |
| 284 | 284 | |
| 285 | 285 | end($coll); |
| 286 | - $this->resultPointers[$dqlAlias] =& $coll[key($coll)]; |
|
| 286 | + $this->resultPointers[$dqlAlias] = & $coll[key($coll)]; |
|
| 287 | 287 | } |
| 288 | 288 | } |