@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | /** |
| 269 | 269 | * Generates a string of currently query |
| 270 | 270 | * |
| 271 | - * @param array $query |
|
| 271 | + * @param string $query |
|
| 272 | 272 | * @param string $criteria |
| 273 | 273 | * @param array $orderBy |
| 274 | 274 | * @param integer $limit |
@@ -335,6 +335,7 @@ discard block |
||
| 335 | 335 | |
| 336 | 336 | /** |
| 337 | 337 | * {@inheritdoc} |
| 338 | + * @param string $fieldName |
|
| 338 | 339 | */ |
| 339 | 340 | public function getOwningTable($fieldName) |
| 340 | 341 | { |
@@ -367,6 +368,7 @@ discard block |
||
| 367 | 368 | |
| 368 | 369 | /** |
| 369 | 370 | * {@inheritdoc} |
| 371 | + * @param \Doctrine\Tests\Models\Cache\Country $entity |
|
| 370 | 372 | */ |
| 371 | 373 | public function insert($entity) |
| 372 | 374 | { |
@@ -50,9 +50,9 @@ |
||
| 50 | 50 | */ |
| 51 | 51 | protected $class; |
| 52 | 52 | |
| 53 | - /** |
|
| 54 | - * @var array |
|
| 55 | - */ |
|
| 53 | + /** |
|
| 54 | + * @var array |
|
| 55 | + */ |
|
| 56 | 56 | protected $queuedCache = []; |
| 57 | 57 | |
| 58 | 58 | /** |
@@ -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 | |
@@ -390,7 +390,7 @@ discard block |
||
| 390 | 390 | // Entity deletions come last and need to be in reverse commit order |
| 391 | 391 | if ($this->entityDeletions) { |
| 392 | 392 | foreach (array_reverse($commitOrder) as $committedEntityName) { |
| 393 | - if (! $this->entityDeletions) { |
|
| 393 | + if ( ! $this->entityDeletions) { |
|
| 394 | 394 | break; // just a performance optimisation |
| 395 | 395 | } |
| 396 | 396 | |
@@ -475,7 +475,7 @@ discard block |
||
| 475 | 475 | $oid = spl_object_hash($entity); |
| 476 | 476 | $data = []; |
| 477 | 477 | |
| 478 | - if (!isset($this->entityChangeSets[$oid])) { |
|
| 478 | + if ( ! isset($this->entityChangeSets[$oid])) { |
|
| 479 | 479 | return $data; |
| 480 | 480 | } |
| 481 | 481 | |
@@ -558,7 +558,7 @@ discard block |
||
| 558 | 558 | || ! $class->getProperty($name) instanceof FieldMetadata |
| 559 | 559 | || ! $class->getProperty($name)->hasValueGenerator() |
| 560 | 560 | || $class->getProperty($name)->getValueGenerator()->getType() !== GeneratorType::IDENTITY |
| 561 | - ) && (! $class->isVersioned() || $name !== $class->versionProperty->getName())) { |
|
| 561 | + ) && ( ! $class->isVersioned() || $name !== $class->versionProperty->getName())) { |
|
| 562 | 562 | $actualData[$name] = $value; |
| 563 | 563 | } |
| 564 | 564 | } |
@@ -612,7 +612,7 @@ discard block |
||
| 612 | 612 | if ($owner === null) { // cloned |
| 613 | 613 | $actualValue->setOwner($entity, $property); |
| 614 | 614 | } else if ($owner !== $entity) { // no clone, we have to fix |
| 615 | - if (! $actualValue->isInitialized()) { |
|
| 615 | + if ( ! $actualValue->isInitialized()) { |
|
| 616 | 616 | $actualValue->initialize(); // we have to do this otherwise the cols share state |
| 617 | 617 | } |
| 618 | 618 | |
@@ -650,7 +650,7 @@ discard block |
||
| 650 | 650 | // Check if original value exists |
| 651 | 651 | if ($orgValue instanceof PersistentCollection) { |
| 652 | 652 | // A PersistentCollection was de-referenced, so delete it. |
| 653 | - if (! $this->isCollectionScheduledForDeletion($orgValue)) { |
|
| 653 | + if ( ! $this->isCollectionScheduledForDeletion($orgValue)) { |
|
| 654 | 654 | $this->scheduleCollectionDeletion($orgValue); |
| 655 | 655 | |
| 656 | 656 | $changeSet[$propName] = $orgValue; // Signal changeset, to-many associations will be ignored |
@@ -673,7 +673,7 @@ discard block |
||
| 673 | 673 | |
| 674 | 674 | // Look for changes in associations of the entity |
| 675 | 675 | foreach ($class->getDeclaredPropertiesIterator() as $property) { |
| 676 | - if (! ($property instanceof AssociationMetadata) || ($value = $property->getValue($entity)) === null) { |
|
| 676 | + if ( ! ($property instanceof AssociationMetadata) || ($value = $property->getValue($entity)) === null) { |
|
| 677 | 677 | continue; |
| 678 | 678 | } |
| 679 | 679 | |
@@ -777,13 +777,13 @@ discard block |
||
| 777 | 777 | $targetClass = $this->em->getClassMetadata($targetEntity); |
| 778 | 778 | |
| 779 | 779 | foreach ($unwrappedValue as $key => $entry) { |
| 780 | - if (! ($entry instanceof $targetEntity)) { |
|
| 780 | + if ( ! ($entry instanceof $targetEntity)) { |
|
| 781 | 781 | throw ORMInvalidArgumentException::invalidAssociation($targetClass, $association, $entry); |
| 782 | 782 | } |
| 783 | 783 | |
| 784 | 784 | $state = $this->getEntityState($entry, self::STATE_NEW); |
| 785 | 785 | |
| 786 | - if (! ($entry instanceof $targetEntity)) { |
|
| 786 | + if ( ! ($entry instanceof $targetEntity)) { |
|
| 787 | 787 | throw ORMException::unexpectedAssociationValue( |
| 788 | 788 | $association->getSourceEntity(), |
| 789 | 789 | $association->getName(), |
@@ -845,7 +845,7 @@ discard block |
||
| 845 | 845 | $persister = $this->getEntityPersister($class->getClassName()); |
| 846 | 846 | $generationPlan->executeImmediate($this->em, $entity); |
| 847 | 847 | |
| 848 | - if (! $generationPlan->containsDeferred()) { |
|
| 848 | + if ( ! $generationPlan->containsDeferred()) { |
|
| 849 | 849 | $id = $this->em->getIdentifierFlattener()->flattenIdentifier($class, $persister->getIdentifier($entity)); |
| 850 | 850 | $this->entityIdentifiers[$oid] = $id; |
| 851 | 851 | } |
@@ -878,7 +878,7 @@ discard block |
||
| 878 | 878 | { |
| 879 | 879 | $oid = spl_object_hash($entity); |
| 880 | 880 | |
| 881 | - if (! isset($this->entityStates[$oid]) || $this->entityStates[$oid] !== self::STATE_MANAGED) { |
|
| 881 | + if ( ! isset($this->entityStates[$oid]) || $this->entityStates[$oid] !== self::STATE_MANAGED) { |
|
| 882 | 882 | throw ORMInvalidArgumentException::entityNotManaged($entity); |
| 883 | 883 | } |
| 884 | 884 | |
@@ -900,7 +900,7 @@ discard block |
||
| 900 | 900 | break; |
| 901 | 901 | |
| 902 | 902 | case ($property instanceof FieldMetadata): |
| 903 | - if (! $property->isPrimaryKey() |
|
| 903 | + if ( ! $property->isPrimaryKey() |
|
| 904 | 904 | || ! $property->getValueGenerator() |
| 905 | 905 | || $property->getValueGenerator()->getType() !== GeneratorType::IDENTITY) { |
| 906 | 906 | $actualData[$name] = $property->getValue($entity); |
@@ -1053,7 +1053,7 @@ discard block |
||
| 1053 | 1053 | // Entity with this $oid after deletion treated as NEW, even if the $oid |
| 1054 | 1054 | // is obtained by a new entity because the old one went out of scope. |
| 1055 | 1055 | //$this->entityStates[$oid] = self::STATE_NEW; |
| 1056 | - if (! $class->isIdentifierComposite()) { |
|
| 1056 | + if ( ! $class->isIdentifierComposite()) { |
|
| 1057 | 1057 | $property = $class->getProperty($class->getSingleIdentifierFieldName()); |
| 1058 | 1058 | |
| 1059 | 1059 | if ($property instanceof FieldMetadata && $property->hasValueGenerator()) { |
@@ -1100,7 +1100,7 @@ discard block |
||
| 1100 | 1100 | // Calculate dependencies for new nodes |
| 1101 | 1101 | while ($class = array_pop($newNodes)) { |
| 1102 | 1102 | foreach ($class->getDeclaredPropertiesIterator() as $property) { |
| 1103 | - if (! ($property instanceof ToOneAssociationMetadata && $property->isOwningSide())) { |
|
| 1103 | + if ( ! ($property instanceof ToOneAssociationMetadata && $property->isOwningSide())) { |
|
| 1104 | 1104 | continue; |
| 1105 | 1105 | } |
| 1106 | 1106 | |
@@ -1114,7 +1114,7 @@ discard block |
||
| 1114 | 1114 | |
| 1115 | 1115 | $weight = ! array_filter( |
| 1116 | 1116 | $property->getJoinColumns(), |
| 1117 | - function (JoinColumnMetadata $joinColumn) { return $joinColumn->isNullable(); } |
|
| 1117 | + function(JoinColumnMetadata $joinColumn) { return $joinColumn->isNullable(); } |
|
| 1118 | 1118 | ); |
| 1119 | 1119 | |
| 1120 | 1120 | $calc->addDependency($targetClass->getClassName(), $class->getClassName(), $weight); |
@@ -1408,7 +1408,7 @@ discard block |
||
| 1408 | 1408 | $persister = $this->getEntityPersister($class->getClassName()); |
| 1409 | 1409 | $id = $persister->getIdentifier($entity); |
| 1410 | 1410 | |
| 1411 | - if (! $id) { |
|
| 1411 | + if ( ! $id) { |
|
| 1412 | 1412 | return self::STATE_NEW; |
| 1413 | 1413 | } |
| 1414 | 1414 | |
@@ -1641,7 +1641,7 @@ discard block |
||
| 1641 | 1641 | throw ORMInvalidArgumentException::detachedEntityCannot($entity, "persisted"); |
| 1642 | 1642 | |
| 1643 | 1643 | default: |
| 1644 | - throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity)); |
|
| 1644 | + throw new UnexpectedValueException("Unexpected entity state: $entityState.".self::objToStr($entity)); |
|
| 1645 | 1645 | } |
| 1646 | 1646 | |
| 1647 | 1647 | $this->cascadePersist($entity, $visited); |
@@ -1711,7 +1711,7 @@ discard block |
||
| 1711 | 1711 | case self::STATE_DETACHED: |
| 1712 | 1712 | throw ORMInvalidArgumentException::detachedEntityCannot($entity, "removed"); |
| 1713 | 1713 | default: |
| 1714 | - throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity)); |
|
| 1714 | + throw new UnexpectedValueException("Unexpected entity state: $entityState.".self::objToStr($entity)); |
|
| 1715 | 1715 | } |
| 1716 | 1716 | |
| 1717 | 1717 | } |
@@ -1780,7 +1780,7 @@ discard block |
||
| 1780 | 1780 | $class = $this->em->getClassMetadata(get_class($entity)); |
| 1781 | 1781 | |
| 1782 | 1782 | foreach ($class->getDeclaredPropertiesIterator() as $association) { |
| 1783 | - if (! ($association instanceof AssociationMetadata && in_array('refresh', $association->getCascade()))) { |
|
| 1783 | + if ( ! ($association instanceof AssociationMetadata && in_array('refresh', $association->getCascade()))) { |
|
| 1784 | 1784 | continue; |
| 1785 | 1785 | } |
| 1786 | 1786 | |
@@ -1829,7 +1829,7 @@ discard block |
||
| 1829 | 1829 | } |
| 1830 | 1830 | |
| 1831 | 1831 | foreach ($class->getDeclaredPropertiesIterator() as $association) { |
| 1832 | - if (! ($association instanceof AssociationMetadata && in_array('persist', $association->getCascade()))) { |
|
| 1832 | + if ( ! ($association instanceof AssociationMetadata && in_array('persist', $association->getCascade()))) { |
|
| 1833 | 1833 | continue; |
| 1834 | 1834 | } |
| 1835 | 1835 | |
@@ -1845,7 +1845,7 @@ discard block |
||
| 1845 | 1845 | |
| 1846 | 1846 | case ($relatedEntities instanceof Collection): |
| 1847 | 1847 | case (is_array($relatedEntities)): |
| 1848 | - if (! ($association instanceof ToManyAssociationMetadata)) { |
|
| 1848 | + if ( ! ($association instanceof ToManyAssociationMetadata)) { |
|
| 1849 | 1849 | throw ORMInvalidArgumentException::invalidAssociation( |
| 1850 | 1850 | $this->em->getClassMetadata($targetEntity), |
| 1851 | 1851 | $association, |
@@ -1860,7 +1860,7 @@ discard block |
||
| 1860 | 1860 | break; |
| 1861 | 1861 | |
| 1862 | 1862 | case ($relatedEntities !== null): |
| 1863 | - if (! $relatedEntities instanceof $targetEntity) { |
|
| 1863 | + if ( ! $relatedEntities instanceof $targetEntity) { |
|
| 1864 | 1864 | throw ORMInvalidArgumentException::invalidAssociation( |
| 1865 | 1865 | $this->em->getClassMetadata($targetEntity), |
| 1866 | 1866 | $association, |
@@ -1891,7 +1891,7 @@ discard block |
||
| 1891 | 1891 | $class = $this->em->getClassMetadata(get_class($entity)); |
| 1892 | 1892 | |
| 1893 | 1893 | foreach ($class->getDeclaredPropertiesIterator() as $association) { |
| 1894 | - if (! ($association instanceof AssociationMetadata && in_array('remove', $association->getCascade()))) { |
|
| 1894 | + if ( ! ($association instanceof AssociationMetadata && in_array('remove', $association->getCascade()))) { |
|
| 1895 | 1895 | continue; |
| 1896 | 1896 | } |
| 1897 | 1897 | |
@@ -1975,7 +1975,7 @@ discard block |
||
| 1975 | 1975 | case LockMode::NONE === $lockMode: |
| 1976 | 1976 | case LockMode::PESSIMISTIC_READ === $lockMode: |
| 1977 | 1977 | case LockMode::PESSIMISTIC_WRITE === $lockMode: |
| 1978 | - if (!$this->em->getConnection()->isTransactionActive()) { |
|
| 1978 | + if ( ! $this->em->getConnection()->isTransactionActive()) { |
|
| 1979 | 1979 | throw TransactionRequiredException::transactionRequired(); |
| 1980 | 1980 | } |
| 1981 | 1981 | |
@@ -2196,7 +2196,7 @@ discard block |
||
| 2196 | 2196 | } |
| 2197 | 2197 | |
| 2198 | 2198 | foreach ($class->getDeclaredPropertiesIterator() as $field => $association) { |
| 2199 | - if (! ($association instanceof AssociationMetadata)) { |
|
| 2199 | + if ( ! ($association instanceof AssociationMetadata)) { |
|
| 2200 | 2200 | continue; |
| 2201 | 2201 | } |
| 2202 | 2202 | |
@@ -2245,7 +2245,7 @@ discard block |
||
| 2245 | 2245 | continue; |
| 2246 | 2246 | } |
| 2247 | 2247 | |
| 2248 | - if (! $association->isOwningSide()) { |
|
| 2248 | + if ( ! $association->isOwningSide()) { |
|
| 2249 | 2249 | // use the given entity association |
| 2250 | 2250 | if (isset($data[$field]) && is_object($data[$field]) && |
| 2251 | 2251 | isset($this->entityStates[spl_object_hash($data[$field])])) { |
@@ -2295,7 +2295,7 @@ discard block |
||
| 2295 | 2295 | $associatedId[$targetField] = $joinColumnValue; |
| 2296 | 2296 | } |
| 2297 | 2297 | |
| 2298 | - if (! $associatedId) { |
|
| 2298 | + if ( ! $associatedId) { |
|
| 2299 | 2299 | // Foreign key is NULL |
| 2300 | 2300 | $association->setValue($entity, null); |
| 2301 | 2301 | $this->originalEntityData[$oid][$field] = null; |
@@ -2304,7 +2304,7 @@ discard block |
||
| 2304 | 2304 | } |
| 2305 | 2305 | |
| 2306 | 2306 | // @todo guilhermeblanco Can we remove the need of this somehow? |
| 2307 | - if (!isset($hints['fetchMode'][$class->getClassName()][$field])) { |
|
| 2307 | + if ( ! isset($hints['fetchMode'][$class->getClassName()][$field])) { |
|
| 2308 | 2308 | $hints['fetchMode'][$class->getClassName()][$field] = $association->getFetchMode(); |
| 2309 | 2309 | } |
| 2310 | 2310 | |
@@ -2321,7 +2321,7 @@ discard block |
||
| 2321 | 2321 | // If this is an uninitialized proxy, we are deferring eager loads, |
| 2322 | 2322 | // this association is marked as eager fetch, and its an uninitialized proxy (wtf!) |
| 2323 | 2323 | // then we can append this entity for eager loading! |
| 2324 | - if (!$targetClass->isIdentifierComposite() && |
|
| 2324 | + if ( ! $targetClass->isIdentifierComposite() && |
|
| 2325 | 2325 | $newValue instanceof GhostObjectInterface && |
| 2326 | 2326 | isset($hints[self::HINT_DEFEREAGERLOAD]) && |
| 2327 | 2327 | $hints['fetchMode'][$class->getClassName()][$field] === FetchMode::EAGER && |
@@ -2358,7 +2358,7 @@ discard block |
||
| 2358 | 2358 | break; |
| 2359 | 2359 | |
| 2360 | 2360 | // Deferred eager load only works for single identifier classes |
| 2361 | - case (isset($hints[self::HINT_DEFEREAGERLOAD]) && !$targetClass->isIdentifierComposite()): |
|
| 2361 | + case (isset($hints[self::HINT_DEFEREAGERLOAD]) && ! $targetClass->isIdentifierComposite()): |
|
| 2362 | 2362 | // TODO: Is there a faster approach? |
| 2363 | 2363 | $this->eagerLoadingEntities[$targetClass->getRootClassName()][$relatedIdHash] = current($normalizedAssociatedId); |
| 2364 | 2364 | |
@@ -2765,7 +2765,7 @@ discard block |
||
| 2765 | 2765 | { |
| 2766 | 2766 | $class = $this->em->getClassMetadata(get_class($entity)); |
| 2767 | 2767 | |
| 2768 | - if (! $class->getProperty($propertyName)) { |
|
| 2768 | + if ( ! $class->getProperty($propertyName)) { |
|
| 2769 | 2769 | return; // ignore non-persistent fields |
| 2770 | 2770 | } |
| 2771 | 2771 | |
@@ -2905,7 +2905,7 @@ discard block |
||
| 2905 | 2905 | */ |
| 2906 | 2906 | private function afterTransactionComplete() |
| 2907 | 2907 | { |
| 2908 | - $this->performCallbackOnCachedPersister(function (CachedPersister $persister) { |
|
| 2908 | + $this->performCallbackOnCachedPersister(function(CachedPersister $persister) { |
|
| 2909 | 2909 | $persister->afterTransactionComplete(); |
| 2910 | 2910 | }); |
| 2911 | 2911 | } |
@@ -2915,7 +2915,7 @@ discard block |
||
| 2915 | 2915 | */ |
| 2916 | 2916 | private function afterTransactionRolledBack() |
| 2917 | 2917 | { |
| 2918 | - $this->performCallbackOnCachedPersister(function (CachedPersister $persister) { |
|
| 2918 | + $this->performCallbackOnCachedPersister(function(CachedPersister $persister) { |
|
| 2919 | 2919 | $persister->afterTransactionRolledBack(); |
| 2920 | 2920 | }); |
| 2921 | 2921 | } |
@@ -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 | |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | |
| 97 | 97 | $cm = $this->em->getClassMetadata($entityName); |
| 98 | 98 | |
| 99 | - $generateKeys = function (array $entry) use ($cm): EntityCacheKey { |
|
| 99 | + $generateKeys = function(array $entry) use ($cm): EntityCacheKey { |
|
| 100 | 100 | return new EntityCacheKey($cm->getRootClassName(), $entry['identifier']); |
| 101 | 101 | }; |
| 102 | 102 | |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | continue; |
| 168 | 168 | } |
| 169 | 169 | |
| 170 | - $generateKeys = function ($id) use ($assocMetadata): EntityCacheKey { |
|
| 170 | + $generateKeys = function($id) use ($assocMetadata): EntityCacheKey { |
|
| 171 | 171 | return new EntityCacheKey($assocMetadata->getRootClassName(), $id); |
| 172 | 172 | }; |
| 173 | 173 | |
@@ -348,9 +348,9 @@ discard block |
||
| 348 | 348 | $assocIdentifier = $unitOfWork->getEntityIdentifier($assocValue); |
| 349 | 349 | $entityKey = new EntityCacheKey($assocMetadata->getRootClassName(), $assocIdentifier); |
| 350 | 350 | |
| 351 | - if ((! $assocValue instanceof GhostObjectInterface && ($key->cacheMode & Cache::MODE_REFRESH)) || ! $assocRegion->contains($entityKey)) { |
|
| 351 | + if (( ! $assocValue instanceof GhostObjectInterface && ($key->cacheMode & Cache::MODE_REFRESH)) || ! $assocRegion->contains($entityKey)) { |
|
| 352 | 352 | // Entity put fail |
| 353 | - if (! $assocPersister->storeEntityCache($assocValue, $entityKey)) { |
|
| 353 | + if ( ! $assocPersister->storeEntityCache($assocValue, $entityKey)) { |
|
| 354 | 354 | return null; |
| 355 | 355 | } |
| 356 | 356 | } |
@@ -31,9 +31,9 @@ discard block |
||
| 31 | 31 | */ |
| 32 | 32 | private $uow; |
| 33 | 33 | |
| 34 | - /** |
|
| 35 | - * @var \Doctrine\ORM\Cache\CacheFactory |
|
| 36 | - */ |
|
| 34 | + /** |
|
| 35 | + * @var \Doctrine\ORM\Cache\CacheFactory |
|
| 36 | + */ |
|
| 37 | 37 | private $cacheFactory; |
| 38 | 38 | |
| 39 | 39 | /** |
@@ -273,12 +273,12 @@ discard block |
||
| 273 | 273 | return $this->queryCaches[$regionName]; |
| 274 | 274 | } |
| 275 | 275 | |
| 276 | - /** |
|
| 277 | - * @param \Doctrine\ORM\Mapping\ClassMetadata $metadata The entity metadata. |
|
| 278 | - * @param mixed $identifier The entity identifier. |
|
| 279 | - * |
|
| 280 | - * @return \Doctrine\ORM\Cache\EntityCacheKey |
|
| 281 | - */ |
|
| 276 | + /** |
|
| 277 | + * @param \Doctrine\ORM\Mapping\ClassMetadata $metadata The entity metadata. |
|
| 278 | + * @param mixed $identifier The entity identifier. |
|
| 279 | + * |
|
| 280 | + * @return \Doctrine\ORM\Cache\EntityCacheKey |
|
| 281 | + */ |
|
| 282 | 282 | private function buildEntityCacheKey(ClassMetadata $metadata, $identifier) |
| 283 | 283 | { |
| 284 | 284 | if (! is_array($identifier)) { |
@@ -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 | |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | |
| 206 | 206 | foreach ($metadatas as $metadata) { |
| 207 | 207 | foreach ($metadata->getDeclaredPropertiesIterator() as $association) { |
| 208 | - if (! $association instanceof ToManyAssociationMetadata) { |
|
| 208 | + if ( ! $association instanceof ToManyAssociationMetadata) { |
|
| 209 | 209 | continue; |
| 210 | 210 | } |
| 211 | 211 | |
@@ -262,8 +262,7 @@ discard block |
||
| 262 | 262 | public function getQueryCache($regionName = null) |
| 263 | 263 | { |
| 264 | 264 | if ($regionName === null) { |
| 265 | - return $this->defaultQueryCache ?: |
|
| 266 | - $this->defaultQueryCache = $this->cacheFactory->buildQueryCache($this->em); |
|
| 265 | + return $this->defaultQueryCache ?: $this->defaultQueryCache = $this->cacheFactory->buildQueryCache($this->em); |
|
| 267 | 266 | } |
| 268 | 267 | |
| 269 | 268 | if ( ! isset($this->queryCaches[$regionName])) { |
@@ -281,7 +280,7 @@ discard block |
||
| 281 | 280 | */ |
| 282 | 281 | private function buildEntityCacheKey(ClassMetadata $metadata, $identifier) |
| 283 | 282 | { |
| 284 | - if (! is_array($identifier)) { |
|
| 283 | + if ( ! is_array($identifier)) { |
|
| 285 | 284 | $identifier = $this->toIdentifierArray($metadata, $identifier); |
| 286 | 285 | } |
| 287 | 286 | |
@@ -297,7 +296,7 @@ discard block |
||
| 297 | 296 | */ |
| 298 | 297 | private function buildCollectionCacheKey(ClassMetadata $metadata, $association, $ownerIdentifier) |
| 299 | 298 | { |
| 300 | - if (! is_array($ownerIdentifier)) { |
|
| 299 | + if ( ! is_array($ownerIdentifier)) { |
|
| 301 | 300 | $ownerIdentifier = $this->toIdentifierArray($metadata, $ownerIdentifier); |
| 302 | 301 | } |
| 303 | 302 | |