@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | } |
338 | 338 | } |
339 | 339 | |
340 | - if (!$this->entityInsertions && !$this->entityDeletions && !$this->entityUpdates && !$this->collectionUpdates && !$this->collectionDeletions && !$this->orphanRemovals) { |
|
340 | + if ( ! $this->entityInsertions && ! $this->entityDeletions && ! $this->entityUpdates && ! $this->collectionUpdates && ! $this->collectionDeletions && ! $this->orphanRemovals) { |
|
341 | 341 | $this->dispatchOnFlushEvent(); |
342 | 342 | $this->dispatchPostFlushEvent(); |
343 | 343 | |
@@ -458,7 +458,7 @@ discard block |
||
458 | 458 | $state = $this->getEntityState($entity); |
459 | 459 | |
460 | 460 | if ($state !== self::STATE_MANAGED && $state !== self::STATE_REMOVED) { |
461 | - throw new \InvalidArgumentException("Entity has to be managed or scheduled for removal for single computation " . self::objToStr($entity)); |
|
461 | + throw new \InvalidArgumentException("Entity has to be managed or scheduled for removal for single computation ".self::objToStr($entity)); |
|
462 | 462 | } |
463 | 463 | |
464 | 464 | $class = $this->em->getClassMetadata(get_class($entity)); |
@@ -514,7 +514,7 @@ discard block |
||
514 | 514 | $oid = spl_object_hash($entity); |
515 | 515 | $data = array(); |
516 | 516 | |
517 | - if (!isset($this->entityChangeSets[$oid])) { |
|
517 | + if ( ! isset($this->entityChangeSets[$oid])) { |
|
518 | 518 | return $data; |
519 | 519 | } |
520 | 520 | |
@@ -677,7 +677,7 @@ discard block |
||
677 | 677 | if ($owner === null) { // cloned |
678 | 678 | $actualValue->setOwner($entity, $assoc); |
679 | 679 | } else if ($owner !== $entity) { // no clone, we have to fix |
680 | - if (!$actualValue->isInitialized()) { |
|
680 | + if ( ! $actualValue->isInitialized()) { |
|
681 | 681 | $actualValue->initialize(); // we have to do this otherwise the cols share state |
682 | 682 | } |
683 | 683 | $newValue = clone $actualValue; |
@@ -823,7 +823,7 @@ discard block |
||
823 | 823 | $targetClass = $this->em->getClassMetadata($assoc['targetEntity']); |
824 | 824 | |
825 | 825 | foreach ($unwrappedValue as $key => $entry) { |
826 | - if (! ($entry instanceof $targetClass->name)) { |
|
826 | + if ( ! ($entry instanceof $targetClass->name)) { |
|
827 | 827 | throw ORMInvalidArgumentException::invalidAssociation($targetClass, $assoc, $entry); |
828 | 828 | } |
829 | 829 | |
@@ -1151,7 +1151,7 @@ discard block |
||
1151 | 1151 | |
1152 | 1152 | $joinColumns = reset($assoc['joinColumns']); |
1153 | 1153 | |
1154 | - $calc->addDependency($targetClass->name, $class->name, (int)empty($joinColumns['nullable'])); |
|
1154 | + $calc->addDependency($targetClass->name, $class->name, (int) empty($joinColumns['nullable'])); |
|
1155 | 1155 | |
1156 | 1156 | // If the target class has mapped subclasses, these share the same dependency. |
1157 | 1157 | if ( ! $targetClass->subClasses) { |
@@ -1678,7 +1678,7 @@ discard block |
||
1678 | 1678 | throw ORMInvalidArgumentException::detachedEntityCannot($entity, "persisted"); |
1679 | 1679 | |
1680 | 1680 | default: |
1681 | - throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity)); |
|
1681 | + throw new UnexpectedValueException("Unexpected entity state: $entityState.".self::objToStr($entity)); |
|
1682 | 1682 | } |
1683 | 1683 | |
1684 | 1684 | $this->cascadePersist($entity, $visited); |
@@ -1748,7 +1748,7 @@ discard block |
||
1748 | 1748 | case self::STATE_DETACHED: |
1749 | 1749 | throw ORMInvalidArgumentException::detachedEntityCannot($entity, "removed"); |
1750 | 1750 | default: |
1751 | - throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity)); |
|
1751 | + throw new UnexpectedValueException("Unexpected entity state: $entityState.".self::objToStr($entity)); |
|
1752 | 1752 | } |
1753 | 1753 | |
1754 | 1754 | } |
@@ -1899,7 +1899,7 @@ discard block |
||
1899 | 1899 | */ |
1900 | 1900 | private function isLoaded($entity) |
1901 | 1901 | { |
1902 | - return !($entity instanceof Proxy) || $entity->__isInitialized(); |
|
1902 | + return ! ($entity instanceof Proxy) || $entity->__isInitialized(); |
|
1903 | 1903 | } |
1904 | 1904 | |
1905 | 1905 | /** |
@@ -2057,7 +2057,7 @@ discard block |
||
2057 | 2057 | |
2058 | 2058 | $associationMappings = array_filter( |
2059 | 2059 | $class->associationMappings, |
2060 | - function ($assoc) { return $assoc['isCascadeRefresh']; } |
|
2060 | + function($assoc) { return $assoc['isCascadeRefresh']; } |
|
2061 | 2061 | ); |
2062 | 2062 | |
2063 | 2063 | foreach ($associationMappings as $assoc) { |
@@ -2100,7 +2100,7 @@ discard block |
||
2100 | 2100 | |
2101 | 2101 | $associationMappings = array_filter( |
2102 | 2102 | $class->associationMappings, |
2103 | - function ($assoc) { return $assoc['isCascadeDetach']; } |
|
2103 | + function($assoc) { return $assoc['isCascadeDetach']; } |
|
2104 | 2104 | ); |
2105 | 2105 | |
2106 | 2106 | foreach ($associationMappings as $assoc) { |
@@ -2144,7 +2144,7 @@ discard block |
||
2144 | 2144 | |
2145 | 2145 | $associationMappings = array_filter( |
2146 | 2146 | $class->associationMappings, |
2147 | - function ($assoc) { return $assoc['isCascadeMerge']; } |
|
2147 | + function($assoc) { return $assoc['isCascadeMerge']; } |
|
2148 | 2148 | ); |
2149 | 2149 | |
2150 | 2150 | foreach ($associationMappings as $assoc) { |
@@ -2183,7 +2183,7 @@ discard block |
||
2183 | 2183 | |
2184 | 2184 | $associationMappings = array_filter( |
2185 | 2185 | $class->associationMappings, |
2186 | - function ($assoc) { return $assoc['isCascadePersist']; } |
|
2186 | + function($assoc) { return $assoc['isCascadePersist']; } |
|
2187 | 2187 | ); |
2188 | 2188 | |
2189 | 2189 | foreach ($associationMappings as $assoc) { |
@@ -2212,7 +2212,7 @@ discard block |
||
2212 | 2212 | break; |
2213 | 2213 | |
2214 | 2214 | case ($relatedEntities !== null): |
2215 | - if (! $relatedEntities instanceof $assoc['targetEntity']) { |
|
2215 | + if ( ! $relatedEntities instanceof $assoc['targetEntity']) { |
|
2216 | 2216 | throw ORMInvalidArgumentException::invalidAssociation( |
2217 | 2217 | $this->em->getClassMetadata($assoc['targetEntity']), |
2218 | 2218 | $assoc, |
@@ -2243,13 +2243,13 @@ discard block |
||
2243 | 2243 | |
2244 | 2244 | $associationMappings = array_filter( |
2245 | 2245 | $class->associationMappings, |
2246 | - function ($assoc) { return $assoc['isCascadeRemove']; } |
|
2246 | + function($assoc) { return $assoc['isCascadeRemove']; } |
|
2247 | 2247 | ); |
2248 | 2248 | |
2249 | 2249 | $entitiesToCascade = array(); |
2250 | 2250 | |
2251 | 2251 | foreach ($associationMappings as $assoc) { |
2252 | - if ($entity instanceof Proxy && !$entity->__isInitialized__) { |
|
2252 | + if ($entity instanceof Proxy && ! $entity->__isInitialized__) { |
|
2253 | 2253 | $entity->__load(); |
2254 | 2254 | } |
2255 | 2255 | |
@@ -2313,7 +2313,7 @@ discard block |
||
2313 | 2313 | return; |
2314 | 2314 | } |
2315 | 2315 | |
2316 | - if ($entity instanceof Proxy && !$entity->__isInitialized__) { |
|
2316 | + if ($entity instanceof Proxy && ! $entity->__isInitialized__) { |
|
2317 | 2317 | $entity->__load(); |
2318 | 2318 | } |
2319 | 2319 | |
@@ -2328,7 +2328,7 @@ discard block |
||
2328 | 2328 | case LockMode::NONE === $lockMode: |
2329 | 2329 | case LockMode::PESSIMISTIC_READ === $lockMode: |
2330 | 2330 | case LockMode::PESSIMISTIC_WRITE === $lockMode: |
2331 | - if (!$this->em->getConnection()->isTransactionActive()) { |
|
2331 | + if ( ! $this->em->getConnection()->isTransactionActive()) { |
|
2332 | 2332 | throw TransactionRequiredException::transactionRequired(); |
2333 | 2333 | } |
2334 | 2334 | |
@@ -2662,7 +2662,7 @@ discard block |
||
2662 | 2662 | // then we can append this entity for eager loading! |
2663 | 2663 | if ($hints['fetchMode'][$class->name][$field] == ClassMetadata::FETCH_EAGER && |
2664 | 2664 | isset($hints[self::HINT_DEFEREAGERLOAD]) && |
2665 | - !$targetClass->isIdentifierComposite && |
|
2665 | + ! $targetClass->isIdentifierComposite && |
|
2666 | 2666 | $newValue instanceof Proxy && |
2667 | 2667 | $newValue->__isInitialized__ === false) { |
2668 | 2668 | |
@@ -3029,7 +3029,7 @@ discard block |
||
3029 | 3029 | public function getCollectionPersister(array $association) |
3030 | 3030 | { |
3031 | 3031 | $role = isset($association['cache']) |
3032 | - ? $association['sourceEntity'] . '::' . $association['fieldName'] |
|
3032 | + ? $association['sourceEntity'].'::'.$association['fieldName'] |
|
3033 | 3033 | : $association['type']; |
3034 | 3034 | |
3035 | 3035 | if (isset($this->collectionPersisters[$role])) { |
@@ -3247,7 +3247,7 @@ discard block |
||
3247 | 3247 | */ |
3248 | 3248 | private function afterTransactionComplete() |
3249 | 3249 | { |
3250 | - $this->performCallbackOnCachedPersister(function (CachedPersister $persister) { |
|
3250 | + $this->performCallbackOnCachedPersister(function(CachedPersister $persister) { |
|
3251 | 3251 | $persister->afterTransactionComplete(); |
3252 | 3252 | }); |
3253 | 3253 | } |
@@ -3257,7 +3257,7 @@ discard block |
||
3257 | 3257 | */ |
3258 | 3258 | private function afterTransactionRolledBack() |
3259 | 3259 | { |
3260 | - $this->performCallbackOnCachedPersister(function (CachedPersister $persister) { |
|
3260 | + $this->performCallbackOnCachedPersister(function(CachedPersister $persister) { |
|
3261 | 3261 | $persister->afterTransactionRolledBack(); |
3262 | 3262 | }); |
3263 | 3263 | } |
@@ -3356,7 +3356,7 @@ discard block |
||
3356 | 3356 | if ($other === null) { |
3357 | 3357 | $prop->setValue($managedCopy, null); |
3358 | 3358 | } else { |
3359 | - if ($other instanceof Proxy && !$other->__isInitialized()) { |
|
3359 | + if ($other instanceof Proxy && ! $other->__isInitialized()) { |
|
3360 | 3360 | // do not merge fields marked lazy that have not been fetched. |
3361 | 3361 | continue; |
3362 | 3362 | } |
@@ -3443,7 +3443,7 @@ discard block |
||
3443 | 3443 | */ |
3444 | 3444 | private function clearIdentityMapForEntityName($entityName) |
3445 | 3445 | { |
3446 | - if (! isset($this->identityMap[$entityName])) { |
|
3446 | + if ( ! isset($this->identityMap[$entityName])) { |
|
3447 | 3447 | return; |
3448 | 3448 | } |
3449 | 3449 |