@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | $relation = $class->associationMappings[$fieldName]; |
| 187 | 187 | $reflField = $class->reflFields[$fieldName]; |
| 188 | 188 | $value = null; |
| 189 | - if (!method_exists($reflField, 'isInitialized') || $reflField->isInitialized($entity)) { |
|
| 189 | + if ( ! method_exists($reflField, 'isInitialized') || $reflField->isInitialized($entity)) { |
|
| 190 | 190 | $value = $reflField->getValue($entity); |
| 191 | 191 | } |
| 192 | 192 | |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | $class->reflFields[$fieldName]->setValue($entity, $value); |
| 204 | 204 | $this->_uow->setOriginalEntityProperty($oid, $fieldName, $value); |
| 205 | 205 | |
| 206 | - $this->initializedCollections[$oid . $fieldName] = $value; |
|
| 206 | + $this->initializedCollections[$oid.$fieldName] = $value; |
|
| 207 | 207 | } else if ( |
| 208 | 208 | isset($this->_hints[Query::HINT_REFRESH]) || |
| 209 | 209 | isset($this->_hints['fetched'][$parentDqlAlias][$fieldName]) && |
@@ -214,10 +214,10 @@ discard block |
||
| 214 | 214 | $value->setInitialized(true); |
| 215 | 215 | $value->unwrap()->clear(); |
| 216 | 216 | |
| 217 | - $this->initializedCollections[$oid . $fieldName] = $value; |
|
| 217 | + $this->initializedCollections[$oid.$fieldName] = $value; |
|
| 218 | 218 | } else { |
| 219 | 219 | // Is already PersistentCollection, and DON'T REFRESH or FETCH-JOIN! |
| 220 | - $this->existingCollections[$oid . $fieldName] = $value; |
|
| 220 | + $this->existingCollections[$oid.$fieldName] = $value; |
|
| 221 | 221 | } |
| 222 | 222 | |
| 223 | 223 | return $value; |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | $idHash = ''; |
| 292 | 292 | |
| 293 | 293 | foreach ($class->identifier as $fieldName) { |
| 294 | - $idHash .= ' ' . (isset($class->associationMappings[$fieldName]) |
|
| 294 | + $idHash .= ' '.(isset($class->associationMappings[$fieldName]) |
|
| 295 | 295 | ? $data[$class->associationMappings[$fieldName]['joinColumns'][0]['name']] |
| 296 | 296 | : $data[$fieldName]); |
| 297 | 297 | } |
@@ -347,7 +347,7 @@ discard block |
||
| 347 | 347 | $parentAlias = $this->_rsm->parentAliasMap[$dqlAlias]; |
| 348 | 348 | // we need the $path to save into the identifier map which entities were already |
| 349 | 349 | // seen for this parent-child relationship |
| 350 | - $path = $parentAlias . '.' . $dqlAlias; |
|
| 350 | + $path = $parentAlias.'.'.$dqlAlias; |
|
| 351 | 351 | |
| 352 | 352 | // We have a RIGHT JOIN result here. Doctrine cannot hydrate RIGHT JOIN Object-Graphs |
| 353 | 353 | if ( ! isset($nonemptyComponents[$parentAlias])) { |
@@ -381,7 +381,7 @@ discard block |
||
| 381 | 381 | |
| 382 | 382 | $oid = spl_object_hash($parentObject); |
| 383 | 383 | $reflFieldValue = null; |
| 384 | - if (!method_exists($reflField, 'isInitialized') || $reflField->isInitialized($parentObject)) { |
|
| 384 | + if ( ! method_exists($reflField, 'isInitialized') || $reflField->isInitialized($parentObject)) { |
|
| 385 | 385 | $reflFieldValue = $reflField->getValue($parentObject); |
| 386 | 386 | } |
| 387 | 387 | |
@@ -389,7 +389,7 @@ discard block |
||
| 389 | 389 | if ( ! ($relation['type'] & ClassMetadata::TO_ONE)) { |
| 390 | 390 | // PATH A: Collection-valued association |
| 391 | 391 | if (isset($nonemptyComponents[$dqlAlias])) { |
| 392 | - $collKey = $oid . $relationField; |
|
| 392 | + $collKey = $oid.$relationField; |
|
| 393 | 393 | if (isset($this->initializedCollections[$collKey])) { |
| 394 | 394 | $reflFieldValue = $this->initializedCollections[$collKey]; |
| 395 | 395 | } else if ( ! isset($this->existingCollections[$collKey])) { |
@@ -435,7 +435,7 @@ discard block |
||
| 435 | 435 | |
| 436 | 436 | } else { |
| 437 | 437 | // PATH B: Single-valued association |
| 438 | - if ( ! $reflFieldValue || isset($this->_hints[Query::HINT_REFRESH]) || ($reflFieldValue instanceof Proxy && !$reflFieldValue->__isInitialized__)) { |
|
| 438 | + if ( ! $reflFieldValue || isset($this->_hints[Query::HINT_REFRESH]) || ($reflFieldValue instanceof Proxy && ! $reflFieldValue->__isInitialized__)) { |
|
| 439 | 439 | // we only need to take action if this value is null, |
| 440 | 440 | // we refresh the entity or its an uninitialized proxy. |
| 441 | 441 | if (isset($nonemptyComponents[$dqlAlias])) { |
@@ -480,7 +480,7 @@ discard block |
||
| 480 | 480 | $entityKey = $this->_rsm->entityMappings[$dqlAlias] ?: 0; |
| 481 | 481 | |
| 482 | 482 | // if this row has a NULL value for the root result id then make it a null result. |
| 483 | - if ( ! isset($nonemptyComponents[$dqlAlias]) ) { |
|
| 483 | + if ( ! isset($nonemptyComponents[$dqlAlias])) { |
|
| 484 | 484 | if ($this->_rsm->isMixed) { |
| 485 | 485 | $result[] = [$entityKey => null]; |
| 486 | 486 | } else { |
@@ -536,13 +536,13 @@ discard block |
||
| 536 | 536 | } |
| 537 | 537 | } |
| 538 | 538 | |
| 539 | - if ( ! isset($resultKey) ) { |
|
| 539 | + if ( ! isset($resultKey)) { |
|
| 540 | 540 | $this->resultCounter++; |
| 541 | 541 | } |
| 542 | 542 | |
| 543 | 543 | // Append scalar values to mixed result sets |
| 544 | 544 | if (isset($rowData['scalars'])) { |
| 545 | - if ( ! isset($resultKey) ) { |
|
| 545 | + if ( ! isset($resultKey)) { |
|
| 546 | 546 | $resultKey = (isset($this->_rsm->indexByMap['scalars'])) |
| 547 | 547 | ? $row[$this->_rsm->indexByMap['scalars']] |
| 548 | 548 | : $this->resultCounter - 1; |
@@ -555,19 +555,19 @@ discard block |
||
| 555 | 555 | |
| 556 | 556 | // Append new object to mixed result sets |
| 557 | 557 | if (isset($rowData['newObjects'])) { |
| 558 | - if ( ! isset($resultKey) ) { |
|
| 558 | + if ( ! isset($resultKey)) { |
|
| 559 | 559 | $resultKey = $this->resultCounter - 1; |
| 560 | 560 | } |
| 561 | 561 | |
| 562 | 562 | |
| 563 | - $scalarCount = (isset($rowData['scalars'])? count($rowData['scalars']): 0); |
|
| 563 | + $scalarCount = (isset($rowData['scalars']) ? count($rowData['scalars']) : 0); |
|
| 564 | 564 | |
| 565 | 565 | foreach ($rowData['newObjects'] as $objIndex => $newObject) { |
| 566 | 566 | $class = $newObject['class']; |
| 567 | 567 | $args = $newObject['args']; |
| 568 | 568 | $obj = $class->newInstanceArgs($args); |
| 569 | 569 | |
| 570 | - if ($scalarCount == 0 && count($rowData['newObjects']) == 1 ) { |
|
| 570 | + if ($scalarCount == 0 && count($rowData['newObjects']) == 1) { |
|
| 571 | 571 | $result[$resultKey] = $obj; |
| 572 | 572 | |
| 573 | 573 | continue; |