@@ -84,7 +84,7 @@ |
||
| 84 | 84 | $this->entityManager->getConnection()->setDatabasePlatform(new PostgreSqlPlatform); |
| 85 | 85 | |
| 86 | 86 | $query = $this->entityManager->createQuery( |
| 87 | - 'SELECT u, g, COUNT(g.id) AS hidden g_quantity FROM Doctrine\Tests\ORM\Tools\Pagination\User u JOIN u.groups g ORDER BY g_quantity, u.id DESC' |
|
| 87 | + 'SELECT u, g, COUNT(g.id) AS hidden g_quantity FROM Doctrine\Tests\ORM\Tools\Pagination\User u JOIN u.groups g ORDER BY g_quantity, u.id DESC' |
|
| 88 | 88 | ); |
| 89 | 89 | $limitQuery = clone $query; |
| 90 | 90 | $limitQuery->setHint(Query::HINT_CUSTOM_OUTPUT_WALKER, LimitSubqueryOutputWalker::class); |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\Tests\ORM\Tools\Pagination; |
| 6 | 6 | |
@@ -130,7 +130,7 @@ |
||
| 130 | 130 | { |
| 131 | 131 | $this->expectException(MappingException::class); |
| 132 | 132 | $this->expectExceptionMessage( |
| 133 | - 'Entity \'Doctrine\Tests\ORM\Mapping\HierarchyBEntity\' has to be part of the discriminator map' |
|
| 133 | + 'Entity \'Doctrine\Tests\ORM\Mapping\HierarchyBEntity\' has to be part of the discriminator map' |
|
| 134 | 134 | . ' of \'Doctrine\Tests\ORM\Mapping\HierarchyBase\' to be properly mapped in the inheritance hierarchy.' |
| 135 | 135 | . ' Alternatively you can make \'Doctrine\Tests\ORM\Mapping\HierarchyBEntity\' an abstract class to' |
| 136 | 136 | . ' avoid this exception from occurring.' |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\Tests\ORM\Mapping; |
| 6 | 6 | |
@@ -24,18 +24,18 @@ |
||
| 24 | 24 | public $avatar; |
| 25 | 25 | |
| 26 | 26 | public function getId() { |
| 27 | - return $this->id; |
|
| 27 | + return $this->id; |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | public function getUsername() { |
| 31 | - return $this->username; |
|
| 31 | + return $this->username; |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | public function getAvatar() { |
| 35 | - return $this->avatar; |
|
| 35 | + return $this->avatar; |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | public function setAvatar(ForumAvatar $avatar) { |
| 39 | - $this->avatar = $avatar; |
|
| 39 | + $this->avatar = $avatar; |
|
| 40 | 40 | } |
| 41 | 41 | } |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\Tests\Models\Forum; |
| 6 | 6 | |
@@ -25,12 +25,12 @@ |
||
| 25 | 25 | |
| 26 | 26 | if ($this->maxRunningTime != 0 && $time > $this->maxRunningTime) { |
| 27 | 27 | $this->fail( |
| 28 | - sprintf( |
|
| 28 | + sprintf( |
|
| 29 | 29 | 'expected running time: <= %s but was: %s', |
| 30 | 30 | |
| 31 | 31 | $this->maxRunningTime, |
| 32 | 32 | $time |
| 33 | - ) |
|
| 33 | + ) |
|
| 34 | 34 | ); |
| 35 | 35 | } |
| 36 | 36 | } |
@@ -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\Tests; |
| 6 | 6 | |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | */ |
| 49 | 49 | public function setMaxRunningTime($maxRunningTime) |
| 50 | 50 | { |
| 51 | - if (! (is_int($maxRunningTime) && $maxRunningTime >= 0)) { |
|
| 51 | + if ( ! (is_int($maxRunningTime) && $maxRunningTime >= 0)) { |
|
| 52 | 52 | throw new \InvalidArgumentException; |
| 53 | 53 | } |
| 54 | 54 | |
@@ -23,7 +23,6 @@ |
||
| 23 | 23 | namespace Doctrine\ORM\Cache; |
| 24 | 24 | |
| 25 | 25 | use Doctrine\Common\Util\ClassUtils; |
| 26 | - |
|
| 27 | 26 | use Doctrine\ORM\Mapping\FetchMode; |
| 28 | 27 | use Doctrine\ORM\Mapping\FieldMetadata; |
| 29 | 28 | use Doctrine\ORM\Mapping\OneToOneAssociationMetadata; |
@@ -1,7 +1,7 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | |
| 4 | -declare(strict_types=1); |
|
| 4 | +declare(strict_types = 1); |
|
| 5 | 5 | |
| 6 | 6 | namespace Doctrine\ORM\Cache; |
| 7 | 7 | |
@@ -59,11 +59,11 @@ discard block |
||
| 59 | 59 | $data = array_merge($data, $persister->getIdentifier($entity)); // why update has no identifier values ? |
| 60 | 60 | |
| 61 | 61 | foreach ($metadata->getDeclaredPropertiesIterator() as $name => $association) { |
| 62 | - if (! isset($data[$name]) || $association instanceof FieldMetadata) { |
|
| 62 | + if ( ! isset($data[$name]) || $association instanceof FieldMetadata) { |
|
| 63 | 63 | continue; |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | - if (! $association instanceof ToOneAssociationMetadata) { |
|
| 66 | + if ( ! $association instanceof ToOneAssociationMetadata) { |
|
| 67 | 67 | unset($data[$name]); |
| 68 | 68 | |
| 69 | 69 | continue; |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | $targetClassMetadata = $this->em->getClassMetadata($targetEntity); |
| 74 | 74 | $targetPersister = $this->uow->getEntityPersister($targetEntity); |
| 75 | 75 | |
| 76 | - if (! $association->getCache()) { |
|
| 76 | + if ( ! $association->getCache()) { |
|
| 77 | 77 | $owningAssociation = ! $association->isOwningSide() |
| 78 | 78 | ? $targetClassMetadata->getProperty($association->getMappedBy()) |
| 79 | 79 | : $association; |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | continue; |
| 122 | 122 | } |
| 123 | 123 | |
| 124 | - if (! $association->isPrimaryKey()) { |
|
| 124 | + if ( ! $association->isPrimaryKey()) { |
|
| 125 | 125 | $targetClass = ClassUtils::getClass($data[$name]); |
| 126 | 126 | $targetId = $this->uow->getEntityIdentifier($data[$name]); |
| 127 | 127 | $data[$name] = new AssociationCacheEntry($targetClass, $targetId); |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | ($association instanceof OneToOneAssociationMetadata && ! $association->isOwningSide()) |
| 172 | 172 | ); |
| 173 | 173 | |
| 174 | - if (! $isEagerLoad) { |
|
| 174 | + if ( ! $isEagerLoad) { |
|
| 175 | 175 | $data[$name] = $this->em->getReference($assocClass, $assocId); |
| 176 | 176 | |
| 177 | 177 | continue; |
@@ -45,6 +45,7 @@ |
||
| 45 | 45 | * {@inheritDoc} |
| 46 | 46 | * |
| 47 | 47 | * @param MultiGetCache $cache |
| 48 | + * @param string $name |
|
| 48 | 49 | */ |
| 49 | 50 | public function __construct($name, MultiGetCache $cache, $lifetime = 0) |
| 50 | 51 | { |
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | |
| 4 | -declare(strict_types=1); |
|
| 4 | +declare(strict_types = 1); |
|
| 5 | 5 | |
| 6 | 6 | namespace Doctrine\ORM\Cache\Region; |
| 7 | 7 | |
@@ -23,7 +23,6 @@ |
||
| 23 | 23 | |
| 24 | 24 | use Doctrine\ORM\Mapping\ToOneAssociationMetadata; |
| 25 | 25 | use PDO; |
| 26 | -use Doctrine\ORM\Mapping\ClassMetadata; |
|
| 27 | 26 | |
| 28 | 27 | /** |
| 29 | 28 | * The ArrayHydrator produces a nested array "graph" that is often (not always) |
@@ -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 | |
@@ -97,10 +97,10 @@ discard block |
||
| 97 | 97 | // It's a joined result |
| 98 | 98 | |
| 99 | 99 | $parent = $this->rsm->parentAliasMap[$dqlAlias]; |
| 100 | - $path = $parent . '.' . $dqlAlias; |
|
| 100 | + $path = $parent.'.'.$dqlAlias; |
|
| 101 | 101 | |
| 102 | 102 | // missing parent data, skipping as RIGHT JOIN hydration is not supported. |
| 103 | - if ( ! isset($nonemptyComponents[$parent]) ) { |
|
| 103 | + if ( ! isset($nonemptyComponents[$parent])) { |
|
| 104 | 104 | continue; |
| 105 | 105 | } |
| 106 | 106 | |
@@ -109,9 +109,9 @@ discard block |
||
| 109 | 109 | if ($this->rsm->isMixed && isset($this->rootAliases[$parent])) { |
| 110 | 110 | $first = reset($this->resultPointers); |
| 111 | 111 | // TODO: Exception if $key === null ? |
| 112 | - $baseElement =& $this->resultPointers[$parent][key($first)]; |
|
| 112 | + $baseElement = & $this->resultPointers[$parent][key($first)]; |
|
| 113 | 113 | } else if (isset($this->resultPointers[$parent])) { |
| 114 | - $baseElement =& $this->resultPointers[$parent]; |
|
| 114 | + $baseElement = & $this->resultPointers[$parent]; |
|
| 115 | 115 | } else { |
| 116 | 116 | unset($this->resultPointers[$dqlAlias]); // Ticket #1228 |
| 117 | 117 | |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | $relation = $parentClass->getProperty($relationAlias); |
| 124 | 124 | |
| 125 | 125 | // Check the type of the relation (many or single-valued) |
| 126 | - if (! $relation instanceof ToOneAssociationMetadata) { |
|
| 126 | + if ( ! $relation instanceof ToOneAssociationMetadata) { |
|
| 127 | 127 | $oneToOne = false; |
| 128 | 128 | |
| 129 | 129 | if ( ! isset($baseElement[$relationAlias])) { |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | } |
| 163 | 163 | } |
| 164 | 164 | |
| 165 | - $coll =& $baseElement[$relationAlias]; |
|
| 165 | + $coll = & $baseElement[$relationAlias]; |
|
| 166 | 166 | |
| 167 | 167 | if (is_array($coll)) { |
| 168 | 168 | $this->updateResultPointer($coll, $index, $dqlAlias, $oneToOne); |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | $entityKey = $this->rsm->entityMappings[$dqlAlias] ?: 0; |
| 175 | 175 | |
| 176 | 176 | // if this row has a NULL value for the root result id then make it a null result. |
| 177 | - if ( ! isset($nonemptyComponents[$dqlAlias]) ) { |
|
| 177 | + if ( ! isset($nonemptyComponents[$dqlAlias])) { |
|
| 178 | 178 | $result[] = $this->rsm->isMixed |
| 179 | 179 | ? [$entityKey => null] |
| 180 | 180 | : null; |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | $resultKey = $this->resultCounter - 1; |
| 236 | 236 | } |
| 237 | 237 | |
| 238 | - $scalarCount = (isset($rowData['scalars'])? count($rowData['scalars']): 0); |
|
| 238 | + $scalarCount = (isset($rowData['scalars']) ? count($rowData['scalars']) : 0); |
|
| 239 | 239 | $onlyOneRootAlias = 0 === $scalarCount && 1 === count($rowData['newObjects']); |
| 240 | 240 | |
| 241 | 241 | foreach ($rowData['newObjects'] as $objIndex => $newObject) { |
@@ -274,13 +274,13 @@ discard block |
||
| 274 | 274 | } |
| 275 | 275 | |
| 276 | 276 | if ($oneToOne) { |
| 277 | - $this->resultPointers[$dqlAlias] =& $coll; |
|
| 277 | + $this->resultPointers[$dqlAlias] = & $coll; |
|
| 278 | 278 | |
| 279 | 279 | return; |
| 280 | 280 | } |
| 281 | 281 | |
| 282 | 282 | if ($index !== false) { |
| 283 | - $this->resultPointers[$dqlAlias] =& $coll[$index]; |
|
| 283 | + $this->resultPointers[$dqlAlias] = & $coll[$index]; |
|
| 284 | 284 | |
| 285 | 285 | return; |
| 286 | 286 | } |
@@ -290,7 +290,7 @@ discard block |
||
| 290 | 290 | } |
| 291 | 291 | |
| 292 | 292 | end($coll); |
| 293 | - $this->resultPointers[$dqlAlias] =& $coll[key($coll)]; |
|
| 293 | + $this->resultPointers[$dqlAlias] = & $coll[key($coll)]; |
|
| 294 | 294 | |
| 295 | 295 | return; |
| 296 | 296 | } |
@@ -25,8 +25,6 @@ |
||
| 25 | 25 | use Doctrine\ORM\Mapping\ToManyAssociationMetadata; |
| 26 | 26 | use Doctrine\ORM\Mapping\ToOneAssociationMetadata; |
| 27 | 27 | use PDO; |
| 28 | -use Doctrine\Common\Collections\ArrayCollection; |
|
| 29 | -use Doctrine\ORM\Event\PostLoadEventDispatcher; |
|
| 30 | 28 | use Doctrine\ORM\Mapping\ClassMetadata; |
| 31 | 29 | use Doctrine\ORM\PersistentCollection; |
| 32 | 30 | use Doctrine\ORM\Proxy\Proxy; |
@@ -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 | |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | */ |
| 69 | 69 | protected function prepare() |
| 70 | 70 | { |
| 71 | - if (! isset($this->hints[UnitOfWork::HINT_DEFEREAGERLOAD])) { |
|
| 71 | + if ( ! isset($this->hints[UnitOfWork::HINT_DEFEREAGERLOAD])) { |
|
| 72 | 72 | $this->hints[UnitOfWork::HINT_DEFEREAGERLOAD] = true; |
| 73 | 73 | } |
| 74 | 74 | |
@@ -78,13 +78,13 @@ discard block |
||
| 78 | 78 | |
| 79 | 79 | // Remember which associations are "fetch joined", so that we know where to inject |
| 80 | 80 | // collection stubs or proxies and where not. |
| 81 | - if (! isset($this->rsm->relationMap[$dqlAlias])) { |
|
| 81 | + if ( ! isset($this->rsm->relationMap[$dqlAlias])) { |
|
| 82 | 82 | continue; |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | $parent = $this->rsm->parentAliasMap[$dqlAlias]; |
| 86 | 86 | |
| 87 | - if (! isset($this->rsm->aliasMap[$parent])) { |
|
| 87 | + if ( ! isset($this->rsm->aliasMap[$parent])) { |
|
| 88 | 88 | throw HydrationException::parentObjectOfRelationNotFound($dqlAlias, $parent); |
| 89 | 89 | } |
| 90 | 90 | |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | $class = $this->getClassMetadata($className); |
| 111 | 111 | $inverseAssoc = $class->getProperty($association->getInversedBy()); |
| 112 | 112 | |
| 113 | - if (! ($inverseAssoc instanceof ToOneAssociationMetadata)) { |
|
| 113 | + if ( ! ($inverseAssoc instanceof ToOneAssociationMetadata)) { |
|
| 114 | 114 | continue; |
| 115 | 115 | } |
| 116 | 116 | |
@@ -176,14 +176,14 @@ discard block |
||
| 176 | 176 | $value = $association->getValue($entity); |
| 177 | 177 | $oid = spl_object_hash($entity); |
| 178 | 178 | |
| 179 | - if (! $value instanceof PersistentCollection) { |
|
| 179 | + if ( ! $value instanceof PersistentCollection) { |
|
| 180 | 180 | $value = $association->wrap($entity, $value, $this->em); |
| 181 | 181 | |
| 182 | 182 | $association->setValue($entity, $value); |
| 183 | 183 | |
| 184 | 184 | $this->uow->setOriginalEntityProperty($oid, $fieldName, $value); |
| 185 | 185 | |
| 186 | - $this->initializedCollections[$oid . $fieldName] = $value; |
|
| 186 | + $this->initializedCollections[$oid.$fieldName] = $value; |
|
| 187 | 187 | } else if ( |
| 188 | 188 | isset($this->hints[Query::HINT_REFRESH]) || |
| 189 | 189 | (isset($this->hints['fetched'][$parentDqlAlias][$fieldName]) && ! $value->isInitialized()) |
@@ -193,10 +193,10 @@ discard block |
||
| 193 | 193 | $value->setInitialized(true); |
| 194 | 194 | $value->unwrap()->clear(); |
| 195 | 195 | |
| 196 | - $this->initializedCollections[$oid . $fieldName] = $value; |
|
| 196 | + $this->initializedCollections[$oid.$fieldName] = $value; |
|
| 197 | 197 | } else { |
| 198 | 198 | // Is already PersistentCollection, and DON'T REFRESH or FETCH-JOIN! |
| 199 | - $this->existingCollections[$oid . $fieldName] = $value; |
|
| 199 | + $this->existingCollections[$oid.$fieldName] = $value; |
|
| 200 | 200 | } |
| 201 | 201 | |
| 202 | 202 | return $value; |
@@ -314,10 +314,10 @@ discard block |
||
| 314 | 314 | $parentAlias = $this->rsm->parentAliasMap[$dqlAlias]; |
| 315 | 315 | // we need the $path to save into the identifier map which entities were already |
| 316 | 316 | // seen for this parent-child relationship |
| 317 | - $path = $parentAlias . '.' . $dqlAlias; |
|
| 317 | + $path = $parentAlias.'.'.$dqlAlias; |
|
| 318 | 318 | |
| 319 | 319 | // We have a RIGHT JOIN result here. Doctrine cannot hydrate RIGHT JOIN Object-Graphs |
| 320 | - if (! isset($nonemptyComponents[$parentAlias])) { |
|
| 320 | + if ( ! isset($nonemptyComponents[$parentAlias])) { |
|
| 321 | 321 | // TODO: Add special case code where we hydrate the right join objects into identity map at least |
| 322 | 322 | continue; |
| 323 | 323 | } |
@@ -348,15 +348,15 @@ discard block |
||
| 348 | 348 | $oid = spl_object_hash($parentObject); |
| 349 | 349 | |
| 350 | 350 | // Check the type of the relation (many or single-valued) |
| 351 | - if (! ($association instanceof ToOneAssociationMetadata)) { |
|
| 351 | + if ( ! ($association instanceof ToOneAssociationMetadata)) { |
|
| 352 | 352 | // PATH A: Collection-valued association |
| 353 | 353 | $reflFieldValue = $association->getValue($parentObject); |
| 354 | 354 | |
| 355 | 355 | if (isset($nonemptyComponents[$dqlAlias])) { |
| 356 | - $collKey = $oid . $relationField; |
|
| 356 | + $collKey = $oid.$relationField; |
|
| 357 | 357 | if (isset($this->initializedCollections[$collKey])) { |
| 358 | 358 | $reflFieldValue = $this->initializedCollections[$collKey]; |
| 359 | - } else if (! isset($this->existingCollections[$collKey])) { |
|
| 359 | + } else if ( ! isset($this->existingCollections[$collKey])) { |
|
| 360 | 360 | $reflFieldValue = $this->initRelatedCollection($parentObject, $parentClass, $relationField, $parentAlias); |
| 361 | 361 | } |
| 362 | 362 | |
@@ -364,7 +364,7 @@ discard block |
||
| 364 | 364 | $index = $indexExists ? $this->identifierMap[$path][$id[$parentAlias]][$id[$dqlAlias]] : false; |
| 365 | 365 | $indexIsValid = $index !== false ? isset($reflFieldValue[$index]) : false; |
| 366 | 366 | |
| 367 | - if (! $indexExists || ! $indexIsValid) { |
|
| 367 | + if ( ! $indexExists || ! $indexIsValid) { |
|
| 368 | 368 | if (isset($this->existingCollections[$collKey])) { |
| 369 | 369 | // Collection exists, only look for the element in the identity map. |
| 370 | 370 | if ($element = $this->getEntityFromIdentityMap($entityName, $data)) { |
@@ -400,7 +400,7 @@ discard block |
||
| 400 | 400 | // PATH B: Single-valued association |
| 401 | 401 | $reflFieldValue = $association->getValue($parentObject); |
| 402 | 402 | |
| 403 | - if (! $reflFieldValue || isset($this->hints[Query::HINT_REFRESH]) || |
|
| 403 | + if ( ! $reflFieldValue || isset($this->hints[Query::HINT_REFRESH]) || |
|
| 404 | 404 | ($reflFieldValue instanceof Proxy && ! $reflFieldValue->__isInitialized())) { |
| 405 | 405 | // we only need to take action if this value is null, |
| 406 | 406 | // we refresh the entity or its an uninitialized proxy. |
@@ -461,7 +461,7 @@ discard block |
||
| 461 | 461 | $entityKey = $this->rsm->entityMappings[$dqlAlias] ?: 0; |
| 462 | 462 | |
| 463 | 463 | // if this row has a NULL value for the root result id then make it a null result. |
| 464 | - if ( ! isset($nonemptyComponents[$dqlAlias]) ) { |
|
| 464 | + if ( ! isset($nonemptyComponents[$dqlAlias])) { |
|
| 465 | 465 | if ($this->rsm->isMixed) { |
| 466 | 466 | $result[] = [$entityKey => null]; |
| 467 | 467 | } else { |
@@ -517,13 +517,13 @@ discard block |
||
| 517 | 517 | } |
| 518 | 518 | } |
| 519 | 519 | |
| 520 | - if ( ! isset($resultKey) ) { |
|
| 520 | + if ( ! isset($resultKey)) { |
|
| 521 | 521 | $this->resultCounter++; |
| 522 | 522 | } |
| 523 | 523 | |
| 524 | 524 | // Append scalar values to mixed result sets |
| 525 | 525 | if (isset($rowData['scalars'])) { |
| 526 | - if ( ! isset($resultKey) ) { |
|
| 526 | + if ( ! isset($resultKey)) { |
|
| 527 | 527 | $resultKey = (isset($this->rsm->indexByMap['scalars'])) |
| 528 | 528 | ? $row[$this->rsm->indexByMap['scalars']] |
| 529 | 529 | : $this->resultCounter - 1; |
@@ -536,7 +536,7 @@ discard block |
||
| 536 | 536 | |
| 537 | 537 | // Append new object to mixed result sets |
| 538 | 538 | if (isset($rowData['newObjects'])) { |
| 539 | - if ( ! isset($resultKey) ) { |
|
| 539 | + if ( ! isset($resultKey)) { |
|
| 540 | 540 | $resultKey = $this->resultCounter - 1; |
| 541 | 541 | } |
| 542 | 542 | |
@@ -548,7 +548,7 @@ discard block |
||
| 548 | 548 | $args = $newObject['args']; |
| 549 | 549 | $obj = $class->newInstanceArgs($args); |
| 550 | 550 | |
| 551 | - if ($hasNoScalars && \count($rowData['newObjects']) === 1 ) { |
|
| 551 | + if ($hasNoScalars && \count($rowData['newObjects']) === 1) { |
|
| 552 | 552 | $result[$resultKey] = $obj; |
| 553 | 553 | |
| 554 | 554 | continue; |
@@ -207,7 +207,6 @@ |
||
| 207 | 207 | |
| 208 | 208 | /** |
| 209 | 209 | * @param ClassMetadata $targetClass |
| 210 | - * @param array $assoc |
|
| 211 | 210 | * @param mixed $actualValue |
| 212 | 211 | * |
| 213 | 212 | * @return self |
@@ -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; |
| 6 | 6 | use Doctrine\ORM\Mapping\AssociationMetadata; |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | */ |
| 22 | 22 | static public function scheduleInsertForManagedEntity($entity) |
| 23 | 23 | { |
| 24 | - return new self("A managed+dirty entity " . self::objToStr($entity) . " can not be scheduled for insertion."); |
|
| 24 | + return new self("A managed+dirty entity ".self::objToStr($entity)." can not be scheduled for insertion."); |
|
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | /** |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | */ |
| 32 | 32 | static public function scheduleInsertForRemovedEntity($entity) |
| 33 | 33 | { |
| 34 | - return new self("Removed entity " . self::objToStr($entity) . " can not be scheduled for insertion."); |
|
| 34 | + return new self("Removed entity ".self::objToStr($entity)." can not be scheduled for insertion."); |
|
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | /** |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | */ |
| 42 | 42 | static public function scheduleInsertTwice($entity) |
| 43 | 43 | { |
| 44 | - return new self("Entity " . self::objToStr($entity) . " can not be scheduled for insertion twice."); |
|
| 44 | + return new self("Entity ".self::objToStr($entity)." can not be scheduled for insertion twice."); |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | /** |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | static public function entityWithoutIdentity($className, $entity) |
| 54 | 54 | { |
| 55 | 55 | return new self( |
| 56 | - "The given entity of type '" . $className . "' (".self::objToStr($entity).") has no identity/no " . |
|
| 56 | + "The given entity of type '".$className."' (".self::objToStr($entity).") has no identity/no ". |
|
| 57 | 57 | "id values set. It cannot be added to the identity map." |
| 58 | 58 | ); |
| 59 | 59 | } |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | */ |
| 66 | 66 | static public function readOnlyRequiresManagedEntity($entity) |
| 67 | 67 | { |
| 68 | - return new self("Only managed entities can be marked or checked as read only. But " . self::objToStr($entity) . " is not"); |
|
| 68 | + return new self("Only managed entities can be marked or checked as read only. But ".self::objToStr($entity)." is not"); |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | /** |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | */ |
| 122 | 122 | static public function entityNotManaged($entity) |
| 123 | 123 | { |
| 124 | - return new self("Entity " . self::objToStr($entity) . " is not managed. An entity is managed if its fetched " . |
|
| 124 | + return new self("Entity ".self::objToStr($entity)." is not managed. An entity is managed if its fetched ". |
|
| 125 | 125 | "from the database or registered as new through EntityManager#persist"); |
| 126 | 126 | } |
| 127 | 127 | |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | */ |
| 134 | 134 | static public function entityHasNoIdentity($entity, $operation) |
| 135 | 135 | { |
| 136 | - return new self("Entity has no identity, therefore " . $operation ." cannot be performed. " . self::objToStr($entity)); |
|
| 136 | + return new self("Entity has no identity, therefore ".$operation." cannot be performed. ".self::objToStr($entity)); |
|
| 137 | 137 | } |
| 138 | 138 | |
| 139 | 139 | /** |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | */ |
| 145 | 145 | static public function entityIsRemoved($entity, $operation) |
| 146 | 146 | { |
| 147 | - return new self("Entity is removed, therefore " . $operation ." cannot be performed. " . self::objToStr($entity)); |
|
| 147 | + return new self("Entity is removed, therefore ".$operation." cannot be performed. ".self::objToStr($entity)); |
|
| 148 | 148 | } |
| 149 | 149 | |
| 150 | 150 | /** |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | */ |
| 156 | 156 | static public function detachedEntityCannot($entity, $operation) |
| 157 | 157 | { |
| 158 | - return new self("Detached entity " . self::objToStr($entity) . " cannot be " . $operation); |
|
| 158 | + return new self("Detached entity ".self::objToStr($entity)." cannot be ".$operation); |
|
| 159 | 159 | } |
| 160 | 160 | |
| 161 | 161 | /** |
@@ -167,8 +167,8 @@ discard block |
||
| 167 | 167 | */ |
| 168 | 168 | public static function invalidObject($context, $given, $parameterIndex = 1) |
| 169 | 169 | { |
| 170 | - return new self($context . ' expects parameter ' . $parameterIndex . |
|
| 171 | - ' to be an entity object, '. gettype($given) . ' given.'); |
|
| 170 | + return new self($context.' expects parameter '.$parameterIndex. |
|
| 171 | + ' to be an entity object, '.gettype($given).' given.'); |
|
| 172 | 172 | } |
| 173 | 173 | |
| 174 | 174 | /** |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | */ |
| 177 | 177 | public static function invalidCompositeIdentifier() |
| 178 | 178 | { |
| 179 | - return new self("Binding an entity with a composite primary key to a query is not supported. " . |
|
| 179 | + return new self("Binding an entity with a composite primary key to a query is not supported. ". |
|
| 180 | 180 | "You should split the parameter into the explicit fields and bind them separately."); |
| 181 | 181 | } |
| 182 | 182 | |