@@ -464,7 +464,7 @@ discard block |
||
| 464 | 464 | $state = $this->getEntityState($entity); |
| 465 | 465 | |
| 466 | 466 | if ($state !== self::STATE_MANAGED && $state !== self::STATE_REMOVED) { |
| 467 | - throw new \InvalidArgumentException("Entity has to be managed or scheduled for removal for single computation " . self::objToStr($entity)); |
|
| 467 | + throw new \InvalidArgumentException("Entity has to be managed or scheduled for removal for single computation ".self::objToStr($entity)); |
|
| 468 | 468 | } |
| 469 | 469 | |
| 470 | 470 | $class = $this->em->getClassMetadata(get_class($entity)); |
@@ -520,7 +520,7 @@ discard block |
||
| 520 | 520 | $oid = spl_object_hash($entity); |
| 521 | 521 | $data = array(); |
| 522 | 522 | |
| 523 | - if (!isset($this->entityChangeSets[$oid])) { |
|
| 523 | + if ( ! isset($this->entityChangeSets[$oid])) { |
|
| 524 | 524 | return $data; |
| 525 | 525 | } |
| 526 | 526 | |
@@ -683,7 +683,7 @@ discard block |
||
| 683 | 683 | if ($owner === null) { // cloned |
| 684 | 684 | $actualValue->setOwner($entity, $assoc); |
| 685 | 685 | } else if ($owner !== $entity) { // no clone, we have to fix |
| 686 | - if (!$actualValue->isInitialized()) { |
|
| 686 | + if ( ! $actualValue->isInitialized()) { |
|
| 687 | 687 | $actualValue->initialize(); // we have to do this otherwise the cols share state |
| 688 | 688 | } |
| 689 | 689 | $newValue = clone $actualValue; |
@@ -829,7 +829,7 @@ discard block |
||
| 829 | 829 | $targetClass = $this->em->getClassMetadata($assoc['targetEntity']); |
| 830 | 830 | |
| 831 | 831 | foreach ($unwrappedValue as $key => $entry) { |
| 832 | - if (! ($entry instanceof $targetClass->name)) { |
|
| 832 | + if ( ! ($entry instanceof $targetClass->name)) { |
|
| 833 | 833 | throw ORMInvalidArgumentException::invalidAssociation($targetClass, $assoc, $entry); |
| 834 | 834 | } |
| 835 | 835 | |
@@ -1688,7 +1688,7 @@ discard block |
||
| 1688 | 1688 | throw ORMInvalidArgumentException::detachedEntityCannot($entity, "persisted"); |
| 1689 | 1689 | |
| 1690 | 1690 | default: |
| 1691 | - throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity)); |
|
| 1691 | + throw new UnexpectedValueException("Unexpected entity state: $entityState.".self::objToStr($entity)); |
|
| 1692 | 1692 | } |
| 1693 | 1693 | |
| 1694 | 1694 | $this->cascadePersist($entity, $visited); |
@@ -1758,7 +1758,7 @@ discard block |
||
| 1758 | 1758 | case self::STATE_DETACHED: |
| 1759 | 1759 | throw ORMInvalidArgumentException::detachedEntityCannot($entity, "removed"); |
| 1760 | 1760 | default: |
| 1761 | - throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity)); |
|
| 1761 | + throw new UnexpectedValueException("Unexpected entity state: $entityState.".self::objToStr($entity)); |
|
| 1762 | 1762 | } |
| 1763 | 1763 | |
| 1764 | 1764 | } |
@@ -1909,7 +1909,7 @@ discard block |
||
| 1909 | 1909 | */ |
| 1910 | 1910 | private function isLoaded($entity) |
| 1911 | 1911 | { |
| 1912 | - return !($entity instanceof Proxy) || $entity->__isInitialized(); |
|
| 1912 | + return ! ($entity instanceof Proxy) || $entity->__isInitialized(); |
|
| 1913 | 1913 | } |
| 1914 | 1914 | |
| 1915 | 1915 | /** |
@@ -2067,7 +2067,7 @@ discard block |
||
| 2067 | 2067 | |
| 2068 | 2068 | $associationMappings = array_filter( |
| 2069 | 2069 | $class->associationMappings, |
| 2070 | - function ($assoc) { return $assoc['isCascadeRefresh']; } |
|
| 2070 | + function($assoc) { return $assoc['isCascadeRefresh']; } |
|
| 2071 | 2071 | ); |
| 2072 | 2072 | |
| 2073 | 2073 | foreach ($associationMappings as $assoc) { |
@@ -2110,7 +2110,7 @@ discard block |
||
| 2110 | 2110 | |
| 2111 | 2111 | $associationMappings = array_filter( |
| 2112 | 2112 | $class->associationMappings, |
| 2113 | - function ($assoc) { return $assoc['isCascadeDetach']; } |
|
| 2113 | + function($assoc) { return $assoc['isCascadeDetach']; } |
|
| 2114 | 2114 | ); |
| 2115 | 2115 | |
| 2116 | 2116 | foreach ($associationMappings as $assoc) { |
@@ -2154,7 +2154,7 @@ discard block |
||
| 2154 | 2154 | |
| 2155 | 2155 | $associationMappings = array_filter( |
| 2156 | 2156 | $class->associationMappings, |
| 2157 | - function ($assoc) { return $assoc['isCascadeMerge']; } |
|
| 2157 | + function($assoc) { return $assoc['isCascadeMerge']; } |
|
| 2158 | 2158 | ); |
| 2159 | 2159 | |
| 2160 | 2160 | foreach ($associationMappings as $assoc) { |
@@ -2193,7 +2193,7 @@ discard block |
||
| 2193 | 2193 | |
| 2194 | 2194 | $associationMappings = array_filter( |
| 2195 | 2195 | $class->associationMappings, |
| 2196 | - function ($assoc) { return $assoc['isCascadePersist']; } |
|
| 2196 | + function($assoc) { return $assoc['isCascadePersist']; } |
|
| 2197 | 2197 | ); |
| 2198 | 2198 | |
| 2199 | 2199 | foreach ($associationMappings as $assoc) { |
@@ -2222,7 +2222,7 @@ discard block |
||
| 2222 | 2222 | break; |
| 2223 | 2223 | |
| 2224 | 2224 | case ($relatedEntities !== null): |
| 2225 | - if (! $relatedEntities instanceof $assoc['targetEntity']) { |
|
| 2225 | + if ( ! $relatedEntities instanceof $assoc['targetEntity']) { |
|
| 2226 | 2226 | throw ORMInvalidArgumentException::invalidAssociation( |
| 2227 | 2227 | $this->em->getClassMetadata($assoc['targetEntity']), |
| 2228 | 2228 | $assoc, |
@@ -2253,13 +2253,13 @@ discard block |
||
| 2253 | 2253 | |
| 2254 | 2254 | $associationMappings = array_filter( |
| 2255 | 2255 | $class->associationMappings, |
| 2256 | - function ($assoc) { return $assoc['isCascadeRemove']; } |
|
| 2256 | + function($assoc) { return $assoc['isCascadeRemove']; } |
|
| 2257 | 2257 | ); |
| 2258 | 2258 | |
| 2259 | 2259 | $entitiesToCascade = array(); |
| 2260 | 2260 | |
| 2261 | 2261 | foreach ($associationMappings as $assoc) { |
| 2262 | - if ($entity instanceof Proxy && !$entity->__isInitialized__) { |
|
| 2262 | + if ($entity instanceof Proxy && ! $entity->__isInitialized__) { |
|
| 2263 | 2263 | $entity->__load(); |
| 2264 | 2264 | } |
| 2265 | 2265 | |
@@ -2323,7 +2323,7 @@ discard block |
||
| 2323 | 2323 | return; |
| 2324 | 2324 | } |
| 2325 | 2325 | |
| 2326 | - if ($entity instanceof Proxy && !$entity->__isInitialized__) { |
|
| 2326 | + if ($entity instanceof Proxy && ! $entity->__isInitialized__) { |
|
| 2327 | 2327 | $entity->__load(); |
| 2328 | 2328 | } |
| 2329 | 2329 | |
@@ -2338,7 +2338,7 @@ discard block |
||
| 2338 | 2338 | case LockMode::NONE === $lockMode: |
| 2339 | 2339 | case LockMode::PESSIMISTIC_READ === $lockMode: |
| 2340 | 2340 | case LockMode::PESSIMISTIC_WRITE === $lockMode: |
| 2341 | - if (!$this->em->getConnection()->isTransactionActive()) { |
|
| 2341 | + if ( ! $this->em->getConnection()->isTransactionActive()) { |
|
| 2342 | 2342 | throw TransactionRequiredException::transactionRequired(); |
| 2343 | 2343 | } |
| 2344 | 2344 | |
@@ -2683,7 +2683,7 @@ discard block |
||
| 2683 | 2683 | // then we can append this entity for eager loading! |
| 2684 | 2684 | if ($hints['fetchMode'][$class->name][$field] == ClassMetadata::FETCH_EAGER && |
| 2685 | 2685 | isset($hints[self::HINT_DEFEREAGERLOAD]) && |
| 2686 | - !$targetClass->isIdentifierComposite && |
|
| 2686 | + ! $targetClass->isIdentifierComposite && |
|
| 2687 | 2687 | $newValue instanceof Proxy && |
| 2688 | 2688 | $newValue->__isInitialized__ === false) { |
| 2689 | 2689 | |
@@ -2995,7 +2995,7 @@ discard block |
||
| 2995 | 2995 | */ |
| 2996 | 2996 | public function size() |
| 2997 | 2997 | { |
| 2998 | - $countArray = array_map(function ($item) { return count($item); }, $this->identityMap); |
|
| 2998 | + $countArray = array_map(function($item) { return count($item); }, $this->identityMap); |
|
| 2999 | 2999 | |
| 3000 | 3000 | return array_sum($countArray); |
| 3001 | 3001 | } |
@@ -3054,7 +3054,7 @@ discard block |
||
| 3054 | 3054 | public function getCollectionPersister(array $association) |
| 3055 | 3055 | { |
| 3056 | 3056 | $role = isset($association['cache']) |
| 3057 | - ? $association['sourceEntity'] . '::' . $association['fieldName'] |
|
| 3057 | + ? $association['sourceEntity'].'::'.$association['fieldName'] |
|
| 3058 | 3058 | : $association['type']; |
| 3059 | 3059 | |
| 3060 | 3060 | if (isset($this->collectionPersisters[$role])) { |
@@ -3272,7 +3272,7 @@ discard block |
||
| 3272 | 3272 | */ |
| 3273 | 3273 | private function afterTransactionComplete() |
| 3274 | 3274 | { |
| 3275 | - $this->performCallbackOnCachedPersister(function (CachedPersister $persister) { |
|
| 3275 | + $this->performCallbackOnCachedPersister(function(CachedPersister $persister) { |
|
| 3276 | 3276 | $persister->afterTransactionComplete(); |
| 3277 | 3277 | }); |
| 3278 | 3278 | } |
@@ -3282,7 +3282,7 @@ discard block |
||
| 3282 | 3282 | */ |
| 3283 | 3283 | private function afterTransactionRolledBack() |
| 3284 | 3284 | { |
| 3285 | - $this->performCallbackOnCachedPersister(function (CachedPersister $persister) { |
|
| 3285 | + $this->performCallbackOnCachedPersister(function(CachedPersister $persister) { |
|
| 3286 | 3286 | $persister->afterTransactionRolledBack(); |
| 3287 | 3287 | }); |
| 3288 | 3288 | } |
@@ -3381,7 +3381,7 @@ discard block |
||
| 3381 | 3381 | if ($other === null) { |
| 3382 | 3382 | $prop->setValue($managedCopy, null); |
| 3383 | 3383 | } else { |
| 3384 | - if ($other instanceof Proxy && !$other->__isInitialized()) { |
|
| 3384 | + if ($other instanceof Proxy && ! $other->__isInitialized()) { |
|
| 3385 | 3385 | // do not merge fields marked lazy that have not been fetched. |
| 3386 | 3386 | continue; |
| 3387 | 3387 | } |