@@ -463,7 +463,7 @@ discard block |
||
463 | 463 | $state = $this->getEntityState($entity); |
464 | 464 | |
465 | 465 | if ($state !== self::STATE_MANAGED && $state !== self::STATE_REMOVED) { |
466 | - throw new \InvalidArgumentException("Entity has to be managed or scheduled for removal for single computation " . self::objToStr($entity)); |
|
466 | + throw new \InvalidArgumentException("Entity has to be managed or scheduled for removal for single computation ".self::objToStr($entity)); |
|
467 | 467 | } |
468 | 468 | |
469 | 469 | $class = $this->em->getClassMetadata(get_class($entity)); |
@@ -519,7 +519,7 @@ discard block |
||
519 | 519 | $oid = spl_object_hash($entity); |
520 | 520 | $data = array(); |
521 | 521 | |
522 | - if (!isset($this->entityChangeSets[$oid])) { |
|
522 | + if ( ! isset($this->entityChangeSets[$oid])) { |
|
523 | 523 | return $data; |
524 | 524 | } |
525 | 525 | |
@@ -682,7 +682,7 @@ discard block |
||
682 | 682 | if ($owner === null) { // cloned |
683 | 683 | $actualValue->setOwner($entity, $assoc); |
684 | 684 | } else if ($owner !== $entity) { // no clone, we have to fix |
685 | - if (!$actualValue->isInitialized()) { |
|
685 | + if ( ! $actualValue->isInitialized()) { |
|
686 | 686 | $actualValue->initialize(); // we have to do this otherwise the cols share state |
687 | 687 | } |
688 | 688 | $newValue = clone $actualValue; |
@@ -828,7 +828,7 @@ discard block |
||
828 | 828 | $targetClass = $this->em->getClassMetadata($assoc['targetEntity']); |
829 | 829 | |
830 | 830 | foreach ($unwrappedValue as $key => $entry) { |
831 | - if (! ($entry instanceof $targetClass->name)) { |
|
831 | + if ( ! ($entry instanceof $targetClass->name)) { |
|
832 | 832 | throw ORMInvalidArgumentException::invalidAssociation($targetClass, $assoc, $entry); |
833 | 833 | } |
834 | 834 | |
@@ -1687,7 +1687,7 @@ discard block |
||
1687 | 1687 | throw ORMInvalidArgumentException::detachedEntityCannot($entity, "persisted"); |
1688 | 1688 | |
1689 | 1689 | default: |
1690 | - throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity)); |
|
1690 | + throw new UnexpectedValueException("Unexpected entity state: $entityState.".self::objToStr($entity)); |
|
1691 | 1691 | } |
1692 | 1692 | |
1693 | 1693 | $this->cascadePersist($entity, $visited); |
@@ -1757,7 +1757,7 @@ discard block |
||
1757 | 1757 | case self::STATE_DETACHED: |
1758 | 1758 | throw ORMInvalidArgumentException::detachedEntityCannot($entity, "removed"); |
1759 | 1759 | default: |
1760 | - throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity)); |
|
1760 | + throw new UnexpectedValueException("Unexpected entity state: $entityState.".self::objToStr($entity)); |
|
1761 | 1761 | } |
1762 | 1762 | |
1763 | 1763 | } |
@@ -1908,7 +1908,7 @@ discard block |
||
1908 | 1908 | */ |
1909 | 1909 | private function isLoaded($entity) |
1910 | 1910 | { |
1911 | - return !($entity instanceof Proxy) || $entity->__isInitialized(); |
|
1911 | + return ! ($entity instanceof Proxy) || $entity->__isInitialized(); |
|
1912 | 1912 | } |
1913 | 1913 | |
1914 | 1914 | /** |
@@ -2066,7 +2066,7 @@ discard block |
||
2066 | 2066 | |
2067 | 2067 | $associationMappings = array_filter( |
2068 | 2068 | $class->associationMappings, |
2069 | - function ($assoc) { return $assoc['isCascadeRefresh']; } |
|
2069 | + function($assoc) { return $assoc['isCascadeRefresh']; } |
|
2070 | 2070 | ); |
2071 | 2071 | |
2072 | 2072 | foreach ($associationMappings as $assoc) { |
@@ -2109,7 +2109,7 @@ discard block |
||
2109 | 2109 | |
2110 | 2110 | $associationMappings = array_filter( |
2111 | 2111 | $class->associationMappings, |
2112 | - function ($assoc) { return $assoc['isCascadeDetach']; } |
|
2112 | + function($assoc) { return $assoc['isCascadeDetach']; } |
|
2113 | 2113 | ); |
2114 | 2114 | |
2115 | 2115 | foreach ($associationMappings as $assoc) { |
@@ -2153,7 +2153,7 @@ discard block |
||
2153 | 2153 | |
2154 | 2154 | $associationMappings = array_filter( |
2155 | 2155 | $class->associationMappings, |
2156 | - function ($assoc) { return $assoc['isCascadeMerge']; } |
|
2156 | + function($assoc) { return $assoc['isCascadeMerge']; } |
|
2157 | 2157 | ); |
2158 | 2158 | |
2159 | 2159 | foreach ($associationMappings as $assoc) { |
@@ -2192,7 +2192,7 @@ discard block |
||
2192 | 2192 | |
2193 | 2193 | $associationMappings = array_filter( |
2194 | 2194 | $class->associationMappings, |
2195 | - function ($assoc) { return $assoc['isCascadePersist']; } |
|
2195 | + function($assoc) { return $assoc['isCascadePersist']; } |
|
2196 | 2196 | ); |
2197 | 2197 | |
2198 | 2198 | foreach ($associationMappings as $assoc) { |
@@ -2221,7 +2221,7 @@ discard block |
||
2221 | 2221 | break; |
2222 | 2222 | |
2223 | 2223 | case ($relatedEntities !== null): |
2224 | - if (! $relatedEntities instanceof $assoc['targetEntity']) { |
|
2224 | + if ( ! $relatedEntities instanceof $assoc['targetEntity']) { |
|
2225 | 2225 | throw ORMInvalidArgumentException::invalidAssociation( |
2226 | 2226 | $this->em->getClassMetadata($assoc['targetEntity']), |
2227 | 2227 | $assoc, |
@@ -2252,13 +2252,13 @@ discard block |
||
2252 | 2252 | |
2253 | 2253 | $associationMappings = array_filter( |
2254 | 2254 | $class->associationMappings, |
2255 | - function ($assoc) { return $assoc['isCascadeRemove']; } |
|
2255 | + function($assoc) { return $assoc['isCascadeRemove']; } |
|
2256 | 2256 | ); |
2257 | 2257 | |
2258 | 2258 | $entitiesToCascade = array(); |
2259 | 2259 | |
2260 | 2260 | foreach ($associationMappings as $assoc) { |
2261 | - if ($entity instanceof Proxy && !$entity->__isInitialized__) { |
|
2261 | + if ($entity instanceof Proxy && ! $entity->__isInitialized__) { |
|
2262 | 2262 | $entity->__load(); |
2263 | 2263 | } |
2264 | 2264 | |
@@ -2322,7 +2322,7 @@ discard block |
||
2322 | 2322 | return; |
2323 | 2323 | } |
2324 | 2324 | |
2325 | - if ($entity instanceof Proxy && !$entity->__isInitialized__) { |
|
2325 | + if ($entity instanceof Proxy && ! $entity->__isInitialized__) { |
|
2326 | 2326 | $entity->__load(); |
2327 | 2327 | } |
2328 | 2328 | |
@@ -2337,7 +2337,7 @@ discard block |
||
2337 | 2337 | case LockMode::NONE === $lockMode: |
2338 | 2338 | case LockMode::PESSIMISTIC_READ === $lockMode: |
2339 | 2339 | case LockMode::PESSIMISTIC_WRITE === $lockMode: |
2340 | - if (!$this->em->getConnection()->isTransactionActive()) { |
|
2340 | + if ( ! $this->em->getConnection()->isTransactionActive()) { |
|
2341 | 2341 | throw TransactionRequiredException::transactionRequired(); |
2342 | 2342 | } |
2343 | 2343 | |
@@ -2673,7 +2673,7 @@ discard block |
||
2673 | 2673 | // then we can append this entity for eager loading! |
2674 | 2674 | if ($hints['fetchMode'][$class->name][$field] == ClassMetadata::FETCH_EAGER && |
2675 | 2675 | isset($hints[self::HINT_DEFEREAGERLOAD]) && |
2676 | - !$targetClass->isIdentifierComposite && |
|
2676 | + ! $targetClass->isIdentifierComposite && |
|
2677 | 2677 | $newValue instanceof Proxy && |
2678 | 2678 | $newValue->__isInitialized__ === false) { |
2679 | 2679 | |
@@ -2985,7 +2985,7 @@ discard block |
||
2985 | 2985 | */ |
2986 | 2986 | public function size() |
2987 | 2987 | { |
2988 | - $countArray = array_map(function ($item) { return count($item); }, $this->identityMap); |
|
2988 | + $countArray = array_map(function($item) { return count($item); }, $this->identityMap); |
|
2989 | 2989 | |
2990 | 2990 | return array_sum($countArray); |
2991 | 2991 | } |
@@ -3044,7 +3044,7 @@ discard block |
||
3044 | 3044 | public function getCollectionPersister(array $association) |
3045 | 3045 | { |
3046 | 3046 | $role = isset($association['cache']) |
3047 | - ? $association['sourceEntity'] . '::' . $association['fieldName'] |
|
3047 | + ? $association['sourceEntity'].'::'.$association['fieldName'] |
|
3048 | 3048 | : $association['type']; |
3049 | 3049 | |
3050 | 3050 | if (isset($this->collectionPersisters[$role])) { |
@@ -3262,7 +3262,7 @@ discard block |
||
3262 | 3262 | */ |
3263 | 3263 | private function afterTransactionComplete() |
3264 | 3264 | { |
3265 | - $this->performCallbackOnCachedPersister(function (CachedPersister $persister) { |
|
3265 | + $this->performCallbackOnCachedPersister(function(CachedPersister $persister) { |
|
3266 | 3266 | $persister->afterTransactionComplete(); |
3267 | 3267 | }); |
3268 | 3268 | } |
@@ -3272,7 +3272,7 @@ discard block |
||
3272 | 3272 | */ |
3273 | 3273 | private function afterTransactionRolledBack() |
3274 | 3274 | { |
3275 | - $this->performCallbackOnCachedPersister(function (CachedPersister $persister) { |
|
3275 | + $this->performCallbackOnCachedPersister(function(CachedPersister $persister) { |
|
3276 | 3276 | $persister->afterTransactionRolledBack(); |
3277 | 3277 | }); |
3278 | 3278 | } |
@@ -3371,7 +3371,7 @@ discard block |
||
3371 | 3371 | if ($other === null) { |
3372 | 3372 | $prop->setValue($managedCopy, null); |
3373 | 3373 | } else { |
3374 | - if ($other instanceof Proxy && !$other->__isInitialized()) { |
|
3374 | + if ($other instanceof Proxy && ! $other->__isInitialized()) { |
|
3375 | 3375 | // do not merge fields marked lazy that have not been fetched. |
3376 | 3376 | continue; |
3377 | 3377 | } |
@@ -3460,7 +3460,7 @@ discard block |
||
3460 | 3460 | */ |
3461 | 3461 | private function clearIdentityMapForEntityName($entityName) |
3462 | 3462 | { |
3463 | - if (! isset($this->identityMap[$entityName])) { |
|
3463 | + if ( ! isset($this->identityMap[$entityName])) { |
|
3464 | 3464 | return; |
3465 | 3465 | } |
3466 | 3466 |