@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | */ |
| 74 | 74 | public function getCacheLogger() |
| 75 | 75 | { |
| 76 | - return $this->cacheLogger; |
|
| 76 | + return $this->cacheLogger; |
|
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | /** |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | ); |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | - return $this->queryValidator; |
|
| 118 | + return $this->queryValidator; |
|
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | /** |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | foreach ($joinColumns as $joinColumn) { |
| 132 | 132 | $columnName = $this->quoteStrategy->getJoinColumnName($joinColumn, $sourceClass, $this->platform); |
| 133 | 133 | $referencedName = $joinColumn['referencedColumnName']; |
| 134 | - $conditions[] = 't.' . $columnName . ' = ?'; |
|
| 134 | + $conditions[] = 't.'.$columnName.' = ?'; |
|
| 135 | 135 | $params[] = $id[$sourceClass->getFieldForColumn($referencedName)]; |
| 136 | 136 | $types[] = PersisterHelper::getTypeOfColumn($referencedName, $sourceClass, $this->em); |
| 137 | 137 | } |
@@ -160,9 +160,9 @@ discard block |
||
| 160 | 160 | }*/ |
| 161 | 161 | |
| 162 | 162 | $sql = 'SELECT COUNT(*)' |
| 163 | - . ' FROM ' . $joinTableName . ' t' |
|
| 163 | + . ' FROM '.$joinTableName.' t' |
|
| 164 | 164 | . $joinTargetEntitySQL |
| 165 | - . ' WHERE ' . implode(' AND ', $conditions); |
|
| 165 | + . ' WHERE '.implode(' AND ', $conditions); |
|
| 166 | 166 | |
| 167 | 167 | return $this->conn->fetchColumn($sql, $params, 0, $types); |
| 168 | 168 | } |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | |
| 191 | 191 | list($quotedJoinTable, $whereClauses, $params, $types) = $this->getJoinTableRestrictionsWithKey($collection, $key, true); |
| 192 | 192 | |
| 193 | - $sql = 'SELECT 1 FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses); |
|
| 193 | + $sql = 'SELECT 1 FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses); |
|
| 194 | 194 | |
| 195 | 195 | return (bool) $this->conn->fetchColumn($sql, $params, 0, $types); |
| 196 | 196 | } |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | |
| 207 | 207 | list($quotedJoinTable, $whereClauses, $params, $types) = $this->getJoinTableRestrictions($collection, $element, true); |
| 208 | 208 | |
| 209 | - $sql = 'SELECT 1 FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses); |
|
| 209 | + $sql = 'SELECT 1 FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses); |
|
| 210 | 210 | |
| 211 | 211 | return (bool) $this->conn->fetchColumn($sql, $params, 0, $types); |
| 212 | 212 | } |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | |
| 223 | 223 | list($quotedJoinTable, $whereClauses, $params, $types) = $this->getJoinTableRestrictions($collection, $element, false); |
| 224 | 224 | |
| 225 | - $sql = 'DELETE FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses); |
|
| 225 | + $sql = 'DELETE FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses); |
|
| 226 | 226 | |
| 227 | 227 | return (bool) $this->conn->executeUpdate($sql, $params, $types); |
| 228 | 228 | } |
@@ -271,11 +271,11 @@ discard block |
||
| 271 | 271 | $rsm = new Query\ResultSetMappingBuilder($this->em); |
| 272 | 272 | $rsm->addRootEntityFromClassMetadata($targetClass->name, 'te'); |
| 273 | 273 | |
| 274 | - $sql = 'SELECT ' . $rsm->generateSelectClause() |
|
| 275 | - . ' FROM ' . $tableName . ' te' |
|
| 276 | - . ' JOIN ' . $joinTable . ' t ON' |
|
| 274 | + $sql = 'SELECT '.$rsm->generateSelectClause() |
|
| 275 | + . ' FROM '.$tableName.' te' |
|
| 276 | + . ' JOIN '.$joinTable.' t ON' |
|
| 277 | 277 | . implode(' AND ', $onConditions) |
| 278 | - . ' WHERE ' . implode(' AND ', $whereClauses); |
|
| 278 | + . ' WHERE '.implode(' AND ', $whereClauses); |
|
| 279 | 279 | |
| 280 | 280 | $sql .= $this->getOrderingSql($criteria, $targetClass); |
| 281 | 281 | |
@@ -316,8 +316,8 @@ discard block |
||
| 316 | 316 | |
| 317 | 317 | // A join is needed if there is filtering on the target entity |
| 318 | 318 | $tableName = $this->quoteStrategy->getTableName($rootClass, $this->platform); |
| 319 | - $joinSql = ' JOIN ' . $tableName . ' te' |
|
| 320 | - . ' ON' . implode(' AND ', $this->getOnConditionSQL($mapping)); |
|
| 319 | + $joinSql = ' JOIN '.$tableName.' te' |
|
| 320 | + . ' ON'.implode(' AND ', $this->getOnConditionSQL($mapping)); |
|
| 321 | 321 | |
| 322 | 322 | return [$joinSql, $filterSql]; |
| 323 | 323 | } |
@@ -336,12 +336,12 @@ discard block |
||
| 336 | 336 | |
| 337 | 337 | foreach ($this->em->getFilters()->getEnabledFilters() as $filter) { |
| 338 | 338 | if ($filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) { |
| 339 | - $filterClauses[] = '(' . $filterExpr . ')'; |
|
| 339 | + $filterClauses[] = '('.$filterExpr.')'; |
|
| 340 | 340 | } |
| 341 | 341 | } |
| 342 | 342 | |
| 343 | 343 | return $filterClauses |
| 344 | - ? '(' . implode(' AND ', $filterClauses) . ')' |
|
| 344 | + ? '('.implode(' AND ', $filterClauses).')' |
|
| 345 | 345 | : ''; |
| 346 | 346 | } |
| 347 | 347 | |
@@ -369,7 +369,7 @@ discard block |
||
| 369 | 369 | $joinColumnName = $this->quoteStrategy->getJoinColumnName($joinColumn, $targetClass, $this->platform); |
| 370 | 370 | $refColumnName = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform); |
| 371 | 371 | |
| 372 | - $conditions[] = ' t.' . $joinColumnName . ' = ' . 'te.' . $refColumnName; |
|
| 372 | + $conditions[] = ' t.'.$joinColumnName.' = '.'te.'.$refColumnName; |
|
| 373 | 373 | } |
| 374 | 374 | |
| 375 | 375 | return $conditions; |
@@ -391,8 +391,8 @@ discard block |
||
| 391 | 391 | $columns[] = $this->quoteStrategy->getJoinColumnName($joinColumn, $class, $this->platform); |
| 392 | 392 | } |
| 393 | 393 | |
| 394 | - return 'DELETE FROM ' . $joinTable |
|
| 395 | - . ' WHERE ' . implode(' = ? AND ', $columns) . ' = ?'; |
|
| 394 | + return 'DELETE FROM '.$joinTable |
|
| 395 | + . ' WHERE '.implode(' = ? AND ', $columns).' = ?'; |
|
| 396 | 396 | } |
| 397 | 397 | |
| 398 | 398 | /** |
@@ -451,8 +451,8 @@ discard block |
||
| 451 | 451 | } |
| 452 | 452 | |
| 453 | 453 | return [ |
| 454 | - 'DELETE FROM ' . $this->quoteStrategy->getJoinTableName($mapping, $class, $this->platform) |
|
| 455 | - . ' WHERE ' . implode(' = ? AND ', $columns) . ' = ?', |
|
| 454 | + 'DELETE FROM '.$this->quoteStrategy->getJoinTableName($mapping, $class, $this->platform) |
|
| 455 | + . ' WHERE '.implode(' = ? AND ', $columns).' = ?', |
|
| 456 | 456 | $types, |
| 457 | 457 | ]; |
| 458 | 458 | } |
@@ -500,10 +500,10 @@ discard block |
||
| 500 | 500 | } |
| 501 | 501 | |
| 502 | 502 | return [ |
| 503 | - 'INSERT INTO ' . $this->quoteStrategy->getJoinTableName($mapping, $class, $this->platform) |
|
| 504 | - . ' (' . implode(', ', $columns) . ')' |
|
| 503 | + 'INSERT INTO '.$this->quoteStrategy->getJoinTableName($mapping, $class, $this->platform) |
|
| 504 | + . ' ('.implode(', ', $columns).')' |
|
| 505 | 505 | . ' VALUES' |
| 506 | - . ' (' . implode(', ', array_fill(0, count($columns), '?')) . ')', |
|
| 506 | + . ' ('.implode(', ', array_fill(0, count($columns), '?')).')', |
|
| 507 | 507 | $types, |
| 508 | 508 | ]; |
| 509 | 509 | } |
@@ -588,7 +588,7 @@ discard block |
||
| 588 | 588 | $sourceClass = $this->em->getClassMetadata($mapping['sourceEntity']); |
| 589 | 589 | $targetClass = $this->em->getClassMetadata($mapping['targetEntity']); |
| 590 | 590 | |
| 591 | - if (! $mapping['isOwningSide']) { |
|
| 591 | + if ( ! $mapping['isOwningSide']) { |
|
| 592 | 592 | $associationSourceClass = $this->em->getClassMetadata($mapping['targetEntity']); |
| 593 | 593 | $mapping = $associationSourceClass->associationMappings[$mapping['mappedBy']]; |
| 594 | 594 | $joinColumns = $mapping['joinTable']['joinColumns']; |
@@ -601,7 +601,7 @@ discard block |
||
| 601 | 601 | $targetRelationMode = 'relationToTargetKeyColumns'; |
| 602 | 602 | } |
| 603 | 603 | |
| 604 | - $quotedJoinTable = $this->quoteStrategy->getJoinTableName($mapping, $associationSourceClass, $this->platform). ' t'; |
|
| 604 | + $quotedJoinTable = $this->quoteStrategy->getJoinTableName($mapping, $associationSourceClass, $this->platform).' t'; |
|
| 605 | 605 | $whereClauses = []; |
| 606 | 606 | $params = []; |
| 607 | 607 | $types = []; |
@@ -612,14 +612,14 @@ discard block |
||
| 612 | 612 | $joinConditions = []; |
| 613 | 613 | |
| 614 | 614 | foreach ($joinColumns as $joinTableColumn) { |
| 615 | - $joinConditions[] = 't.' . $joinTableColumn['name'] . ' = tr.' . $joinTableColumn['referencedColumnName']; |
|
| 615 | + $joinConditions[] = 't.'.$joinTableColumn['name'].' = tr.'.$joinTableColumn['referencedColumnName']; |
|
| 616 | 616 | } |
| 617 | 617 | |
| 618 | 618 | $tableName = $this->quoteStrategy->getTableName($targetClass, $this->platform); |
| 619 | - $quotedJoinTable .= ' JOIN ' . $tableName . ' tr ON ' . implode(' AND ', $joinConditions); |
|
| 619 | + $quotedJoinTable .= ' JOIN '.$tableName.' tr ON '.implode(' AND ', $joinConditions); |
|
| 620 | 620 | $columnName = $targetClass->getColumnName($indexBy); |
| 621 | 621 | |
| 622 | - $whereClauses[] = 'tr.' . $columnName . ' = ?'; |
|
| 622 | + $whereClauses[] = 'tr.'.$columnName.' = ?'; |
|
| 623 | 623 | $params[] = $key; |
| 624 | 624 | $types[] = PersisterHelper::getTypeOfColumn($columnName, $targetClass, $this->em); |
| 625 | 625 | } |
@@ -627,7 +627,7 @@ discard block |
||
| 627 | 627 | foreach ($mapping['joinTableColumns'] as $joinTableColumn) { |
| 628 | 628 | if (isset($mapping[$sourceRelationMode][$joinTableColumn])) { |
| 629 | 629 | $column = $mapping[$sourceRelationMode][$joinTableColumn]; |
| 630 | - $whereClauses[] = 't.' . $joinTableColumn . ' = ?'; |
|
| 630 | + $whereClauses[] = 't.'.$joinTableColumn.' = ?'; |
|
| 631 | 631 | $params[] = $sourceClass->containsForeignIdentifier |
| 632 | 632 | ? $id[$sourceClass->getFieldForColumn($column)] |
| 633 | 633 | : $id[$sourceClass->fieldNames[$column]]; |
@@ -635,7 +635,7 @@ discard block |
||
| 635 | 635 | } elseif ( ! $joinNeeded) { |
| 636 | 636 | $column = $mapping[$targetRelationMode][$joinTableColumn]; |
| 637 | 637 | |
| 638 | - $whereClauses[] = 't.' . $joinTableColumn . ' = ?'; |
|
| 638 | + $whereClauses[] = 't.'.$joinTableColumn.' = ?'; |
|
| 639 | 639 | $params[] = $key; |
| 640 | 640 | $types[] = PersisterHelper::getTypeOfColumn($column, $targetClass, $this->em); |
| 641 | 641 | } |
@@ -645,7 +645,7 @@ discard block |
||
| 645 | 645 | list($joinTargetEntitySQL, $filterSql) = $this->getFilterSql($filterMapping); |
| 646 | 646 | |
| 647 | 647 | if ($filterSql) { |
| 648 | - $quotedJoinTable .= ' ' . $joinTargetEntitySQL; |
|
| 648 | + $quotedJoinTable .= ' '.$joinTargetEntitySQL; |
|
| 649 | 649 | $whereClauses[] = $filterSql; |
| 650 | 650 | } |
| 651 | 651 | } |
@@ -689,7 +689,7 @@ discard block |
||
| 689 | 689 | $types = []; |
| 690 | 690 | |
| 691 | 691 | foreach ($mapping['joinTableColumns'] as $joinTableColumn) { |
| 692 | - $whereClauses[] = ($addFilters ? 't.' : '') . $joinTableColumn . ' = ?'; |
|
| 692 | + $whereClauses[] = ($addFilters ? 't.' : '').$joinTableColumn.' = ?'; |
|
| 693 | 693 | |
| 694 | 694 | if (isset($mapping['relationToTargetKeyColumns'][$joinTableColumn])) { |
| 695 | 695 | $targetColumn = $mapping['relationToTargetKeyColumns'][$joinTableColumn]; |
@@ -711,7 +711,7 @@ discard block |
||
| 711 | 711 | list($joinTargetEntitySQL, $filterSql) = $this->getFilterSql($filterMapping); |
| 712 | 712 | |
| 713 | 713 | if ($filterSql) { |
| 714 | - $quotedJoinTable .= ' ' . $joinTargetEntitySQL; |
|
| 714 | + $quotedJoinTable .= ' '.$joinTargetEntitySQL; |
|
| 715 | 715 | $whereClauses[] = $filterSql; |
| 716 | 716 | } |
| 717 | 717 | } |
@@ -760,10 +760,10 @@ discard block |
||
| 760 | 760 | $targetClass, |
| 761 | 761 | $this->platform |
| 762 | 762 | ); |
| 763 | - $orderBy[] = $field . ' ' . $direction; |
|
| 763 | + $orderBy[] = $field.' '.$direction; |
|
| 764 | 764 | } |
| 765 | 765 | |
| 766 | - return ' ORDER BY ' . implode(', ', $orderBy); |
|
| 766 | + return ' ORDER BY '.implode(', ', $orderBy); |
|
| 767 | 767 | } |
| 768 | 768 | return ''; |
| 769 | 769 | } |
@@ -40,12 +40,12 @@ |
||
| 40 | 40 | $ids = []; |
| 41 | 41 | |
| 42 | 42 | foreach ($id as $key => $value) { |
| 43 | - $ids[] = $key . '(' . $value . ')'; |
|
| 43 | + $ids[] = $key.'('.$value.')'; |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | |
| 47 | 47 | return new self( |
| 48 | - 'Entity of type \'' . $className . '\'' . ($ids ? ' for IDs ' . implode(', ', $ids) : '') . ' was not found' |
|
| 48 | + 'Entity of type \''.$className.'\''.($ids ? ' for IDs '.implode(', ', $ids) : '').' was not found' |
|
| 49 | 49 | ); |
| 50 | 50 | } |
| 51 | 51 | } |
@@ -108,10 +108,10 @@ discard block |
||
| 108 | 108 | // It's a joined result |
| 109 | 109 | |
| 110 | 110 | $parent = $this->_rsm->parentAliasMap[$dqlAlias]; |
| 111 | - $path = $parent . '.' . $dqlAlias; |
|
| 111 | + $path = $parent.'.'.$dqlAlias; |
|
| 112 | 112 | |
| 113 | 113 | // missing parent data, skipping as RIGHT JOIN hydration is not supported. |
| 114 | - if ( ! isset($nonemptyComponents[$parent]) ) { |
|
| 114 | + if ( ! isset($nonemptyComponents[$parent])) { |
|
| 115 | 115 | continue; |
| 116 | 116 | } |
| 117 | 117 | |
@@ -120,9 +120,9 @@ discard block |
||
| 120 | 120 | if ($this->_rsm->isMixed && isset($this->_rootAliases[$parent])) { |
| 121 | 121 | $first = reset($this->_resultPointers); |
| 122 | 122 | // TODO: Exception if $key === null ? |
| 123 | - $baseElement =& $this->_resultPointers[$parent][key($first)]; |
|
| 123 | + $baseElement = & $this->_resultPointers[$parent][key($first)]; |
|
| 124 | 124 | } else if (isset($this->_resultPointers[$parent])) { |
| 125 | - $baseElement =& $this->_resultPointers[$parent]; |
|
| 125 | + $baseElement = & $this->_resultPointers[$parent]; |
|
| 126 | 126 | } else { |
| 127 | 127 | unset($this->_resultPointers[$dqlAlias]); // Ticket #1228 |
| 128 | 128 | |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | } |
| 174 | 174 | } |
| 175 | 175 | |
| 176 | - $coll =& $baseElement[$relationAlias]; |
|
| 176 | + $coll = & $baseElement[$relationAlias]; |
|
| 177 | 177 | |
| 178 | 178 | if (is_array($coll)) { |
| 179 | 179 | $this->updateResultPointer($coll, $index, $dqlAlias, $oneToOne); |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | $entityKey = $this->_rsm->entityMappings[$dqlAlias] ?: 0; |
| 186 | 186 | |
| 187 | 187 | // if this row has a NULL value for the root result id then make it a null result. |
| 188 | - if ( ! isset($nonemptyComponents[$dqlAlias]) ) { |
|
| 188 | + if ( ! isset($nonemptyComponents[$dqlAlias])) { |
|
| 189 | 189 | $result[] = $this->_rsm->isMixed |
| 190 | 190 | ? [$entityKey => null] |
| 191 | 191 | : null; |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | $resultKey = $this->_resultCounter - 1; |
| 247 | 247 | } |
| 248 | 248 | |
| 249 | - $scalarCount = (isset($rowData['scalars'])? count($rowData['scalars']): 0); |
|
| 249 | + $scalarCount = (isset($rowData['scalars']) ? count($rowData['scalars']) : 0); |
|
| 250 | 250 | |
| 251 | 251 | foreach ($rowData['newObjects'] as $objIndex => $newObject) { |
| 252 | 252 | $class = $newObject['class']; |
@@ -284,13 +284,13 @@ discard block |
||
| 284 | 284 | } |
| 285 | 285 | |
| 286 | 286 | if ($oneToOne) { |
| 287 | - $this->_resultPointers[$dqlAlias] =& $coll; |
|
| 287 | + $this->_resultPointers[$dqlAlias] = & $coll; |
|
| 288 | 288 | |
| 289 | 289 | return; |
| 290 | 290 | } |
| 291 | 291 | |
| 292 | 292 | if ($index !== false) { |
| 293 | - $this->_resultPointers[$dqlAlias] =& $coll[$index]; |
|
| 293 | + $this->_resultPointers[$dqlAlias] = & $coll[$index]; |
|
| 294 | 294 | |
| 295 | 295 | return; |
| 296 | 296 | } |
@@ -300,7 +300,7 @@ discard block |
||
| 300 | 300 | } |
| 301 | 301 | |
| 302 | 302 | end($coll); |
| 303 | - $this->_resultPointers[$dqlAlias] =& $coll[key($coll)]; |
|
| 303 | + $this->_resultPointers[$dqlAlias] = & $coll[key($coll)]; |
|
| 304 | 304 | |
| 305 | 305 | return; |
| 306 | 306 | } |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | $class->reflFields[$fieldName]->setValue($entity, $value); |
| 200 | 200 | $this->_uow->setOriginalEntityProperty($oid, $fieldName, $value); |
| 201 | 201 | |
| 202 | - $this->initializedCollections[$oid . $fieldName] = $value; |
|
| 202 | + $this->initializedCollections[$oid.$fieldName] = $value; |
|
| 203 | 203 | } else if ( |
| 204 | 204 | isset($this->_hints[Query::HINT_REFRESH]) || |
| 205 | 205 | isset($this->_hints['fetched'][$parentDqlAlias][$fieldName]) && |
@@ -210,10 +210,10 @@ discard block |
||
| 210 | 210 | $value->setInitialized(true); |
| 211 | 211 | $value->unwrap()->clear(); |
| 212 | 212 | |
| 213 | - $this->initializedCollections[$oid . $fieldName] = $value; |
|
| 213 | + $this->initializedCollections[$oid.$fieldName] = $value; |
|
| 214 | 214 | } else { |
| 215 | 215 | // Is already PersistentCollection, and DON'T REFRESH or FETCH-JOIN! |
| 216 | - $this->existingCollections[$oid . $fieldName] = $value; |
|
| 216 | + $this->existingCollections[$oid.$fieldName] = $value; |
|
| 217 | 217 | } |
| 218 | 218 | |
| 219 | 219 | return $value; |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | $idHash = ''; |
| 288 | 288 | |
| 289 | 289 | foreach ($class->identifier as $fieldName) { |
| 290 | - $idHash .= ' ' . (isset($class->associationMappings[$fieldName]) |
|
| 290 | + $idHash .= ' '.(isset($class->associationMappings[$fieldName]) |
|
| 291 | 291 | ? $data[$class->associationMappings[$fieldName]['joinColumns'][0]['name']] |
| 292 | 292 | : $data[$fieldName]); |
| 293 | 293 | } |
@@ -343,7 +343,7 @@ discard block |
||
| 343 | 343 | $parentAlias = $this->_rsm->parentAliasMap[$dqlAlias]; |
| 344 | 344 | // we need the $path to save into the identifier map which entities were already |
| 345 | 345 | // seen for this parent-child relationship |
| 346 | - $path = $parentAlias . '.' . $dqlAlias; |
|
| 346 | + $path = $parentAlias.'.'.$dqlAlias; |
|
| 347 | 347 | |
| 348 | 348 | // We have a RIGHT JOIN result here. Doctrine cannot hydrate RIGHT JOIN Object-Graphs |
| 349 | 349 | if ( ! isset($nonemptyComponents[$parentAlias])) { |
@@ -383,7 +383,7 @@ discard block |
||
| 383 | 383 | $reflFieldValue = $reflField->getValue($parentObject); |
| 384 | 384 | |
| 385 | 385 | if (isset($nonemptyComponents[$dqlAlias])) { |
| 386 | - $collKey = $oid . $relationField; |
|
| 386 | + $collKey = $oid.$relationField; |
|
| 387 | 387 | if (isset($this->initializedCollections[$collKey])) { |
| 388 | 388 | $reflFieldValue = $this->initializedCollections[$collKey]; |
| 389 | 389 | } else if ( ! isset($this->existingCollections[$collKey])) { |
@@ -431,7 +431,7 @@ discard block |
||
| 431 | 431 | // PATH B: Single-valued association |
| 432 | 432 | $reflFieldValue = $reflField->getValue($parentObject); |
| 433 | 433 | |
| 434 | - if ( ! $reflFieldValue || isset($this->_hints[Query::HINT_REFRESH]) || ($reflFieldValue instanceof Proxy && !$reflFieldValue->__isInitialized__)) { |
|
| 434 | + if ( ! $reflFieldValue || isset($this->_hints[Query::HINT_REFRESH]) || ($reflFieldValue instanceof Proxy && ! $reflFieldValue->__isInitialized__)) { |
|
| 435 | 435 | // we only need to take action if this value is null, |
| 436 | 436 | // we refresh the entity or its an unitialized proxy. |
| 437 | 437 | if (isset($nonemptyComponents[$dqlAlias])) { |
@@ -476,7 +476,7 @@ discard block |
||
| 476 | 476 | $entityKey = $this->_rsm->entityMappings[$dqlAlias] ?: 0; |
| 477 | 477 | |
| 478 | 478 | // if this row has a NULL value for the root result id then make it a null result. |
| 479 | - if ( ! isset($nonemptyComponents[$dqlAlias]) ) { |
|
| 479 | + if ( ! isset($nonemptyComponents[$dqlAlias])) { |
|
| 480 | 480 | if ($this->_rsm->isMixed) { |
| 481 | 481 | $result[] = [$entityKey => null]; |
| 482 | 482 | } else { |
@@ -532,13 +532,13 @@ discard block |
||
| 532 | 532 | } |
| 533 | 533 | } |
| 534 | 534 | |
| 535 | - if ( ! isset($resultKey) ) { |
|
| 535 | + if ( ! isset($resultKey)) { |
|
| 536 | 536 | $this->resultCounter++; |
| 537 | 537 | } |
| 538 | 538 | |
| 539 | 539 | // Append scalar values to mixed result sets |
| 540 | 540 | if (isset($rowData['scalars'])) { |
| 541 | - if ( ! isset($resultKey) ) { |
|
| 541 | + if ( ! isset($resultKey)) { |
|
| 542 | 542 | $resultKey = (isset($this->_rsm->indexByMap['scalars'])) |
| 543 | 543 | ? $row[$this->_rsm->indexByMap['scalars']] |
| 544 | 544 | : $this->resultCounter - 1; |
@@ -551,19 +551,19 @@ discard block |
||
| 551 | 551 | |
| 552 | 552 | // Append new object to mixed result sets |
| 553 | 553 | if (isset($rowData['newObjects'])) { |
| 554 | - if ( ! isset($resultKey) ) { |
|
| 554 | + if ( ! isset($resultKey)) { |
|
| 555 | 555 | $resultKey = $this->resultCounter - 1; |
| 556 | 556 | } |
| 557 | 557 | |
| 558 | 558 | |
| 559 | - $scalarCount = (isset($rowData['scalars'])? count($rowData['scalars']): 0); |
|
| 559 | + $scalarCount = (isset($rowData['scalars']) ? count($rowData['scalars']) : 0); |
|
| 560 | 560 | |
| 561 | 561 | foreach ($rowData['newObjects'] as $objIndex => $newObject) { |
| 562 | 562 | $class = $newObject['class']; |
| 563 | 563 | $args = $newObject['args']; |
| 564 | 564 | $obj = $class->newInstanceArgs($args); |
| 565 | 565 | |
| 566 | - if ($scalarCount == 0 && count($rowData['newObjects']) == 1 ) { |
|
| 566 | + if ($scalarCount == 0 && count($rowData['newObjects']) == 1) { |
|
| 567 | 567 | $result[$resultKey] = $obj; |
| 568 | 568 | |
| 569 | 569 | continue; |