@@ -340,7 +340,7 @@ discard block |
||
| 340 | 340 | |
| 341 | 341 | $this->computeChangeSets(); |
| 342 | 342 | |
| 343 | - if (! ($this->entityInsertions || |
|
| 343 | + if ( ! ($this->entityInsertions || |
|
| 344 | 344 | $this->entityDeletions || |
| 345 | 345 | $this->entityUpdates || |
| 346 | 346 | $this->collectionUpdates || |
@@ -399,7 +399,7 @@ discard block |
||
| 399 | 399 | // Entity deletions come last and need to be in reverse commit order |
| 400 | 400 | if ($this->entityDeletions) { |
| 401 | 401 | foreach (array_reverse($commitOrder) as $committedEntityName) { |
| 402 | - if (! $this->entityDeletions) { |
|
| 402 | + if ( ! $this->entityDeletions) { |
|
| 403 | 403 | break; // just a performance optimisation |
| 404 | 404 | } |
| 405 | 405 | |
@@ -479,7 +479,7 @@ discard block |
||
| 479 | 479 | $oid = spl_object_id($entity); |
| 480 | 480 | $data = []; |
| 481 | 481 | |
| 482 | - if (! isset($this->entityChangeSets[$oid])) { |
|
| 482 | + if ( ! isset($this->entityChangeSets[$oid])) { |
|
| 483 | 483 | return $data; |
| 484 | 484 | } |
| 485 | 485 | |
@@ -559,12 +559,12 @@ discard block |
||
| 559 | 559 | || ! $class->getProperty($name) instanceof FieldMetadata |
| 560 | 560 | || ! $class->getProperty($name)->hasValueGenerator() |
| 561 | 561 | || $class->getProperty($name)->getValueGenerator()->getType() !== GeneratorType::IDENTITY |
| 562 | - ) && (! $class->isVersioned() || $name !== $class->versionProperty->getName())) { |
|
| 562 | + ) && ( ! $class->isVersioned() || $name !== $class->versionProperty->getName())) { |
|
| 563 | 563 | $actualData[$name] = $value; |
| 564 | 564 | } |
| 565 | 565 | } |
| 566 | 566 | |
| 567 | - if (! isset($this->originalEntityData[$oid])) { |
|
| 567 | + if ( ! isset($this->originalEntityData[$oid])) { |
|
| 568 | 568 | // Entity is either NEW or MANAGED but not yet fully persisted (only has an id). |
| 569 | 569 | // These result in an INSERT. |
| 570 | 570 | $this->originalEntityData[$oid] = $actualData; |
@@ -591,7 +591,7 @@ discard block |
||
| 591 | 591 | |
| 592 | 592 | foreach ($actualData as $propName => $actualValue) { |
| 593 | 593 | // skip field, its a partially omitted one! |
| 594 | - if (! (isset($originalData[$propName]) || array_key_exists($propName, $originalData))) { |
|
| 594 | + if ( ! (isset($originalData[$propName]) || array_key_exists($propName, $originalData))) { |
|
| 595 | 595 | continue; |
| 596 | 596 | } |
| 597 | 597 | |
@@ -613,7 +613,7 @@ discard block |
||
| 613 | 613 | if ($owner === null) { // cloned |
| 614 | 614 | $actualValue->setOwner($entity, $property); |
| 615 | 615 | } elseif ($owner !== $entity) { // no clone, we have to fix |
| 616 | - if (! $actualValue->isInitialized()) { |
|
| 616 | + if ( ! $actualValue->isInitialized()) { |
|
| 617 | 617 | $actualValue->initialize(); // we have to do this otherwise the cols share state |
| 618 | 618 | } |
| 619 | 619 | |
@@ -651,7 +651,7 @@ discard block |
||
| 651 | 651 | // Check if original value exists |
| 652 | 652 | if ($orgValue instanceof PersistentCollection) { |
| 653 | 653 | // A PersistentCollection was de-referenced, so delete it. |
| 654 | - if (! $this->isCollectionScheduledForDeletion($orgValue)) { |
|
| 654 | + if ( ! $this->isCollectionScheduledForDeletion($orgValue)) { |
|
| 655 | 655 | $this->scheduleCollectionDeletion($orgValue); |
| 656 | 656 | |
| 657 | 657 | $changeSet[$propName] = $orgValue; // Signal changeset, to-many associations will be ignored |
@@ -674,7 +674,7 @@ discard block |
||
| 674 | 674 | |
| 675 | 675 | // Look for changes in associations of the entity |
| 676 | 676 | foreach ($class->getDeclaredPropertiesIterator() as $property) { |
| 677 | - if (! $property instanceof AssociationMetadata) { |
|
| 677 | + if ( ! $property instanceof AssociationMetadata) { |
|
| 678 | 678 | continue; |
| 679 | 679 | } |
| 680 | 680 | |
@@ -741,7 +741,7 @@ discard block |
||
| 741 | 741 | // Only MANAGED entities that are NOT SCHEDULED FOR INSERTION OR DELETION are processed here. |
| 742 | 742 | $oid = spl_object_id($entity); |
| 743 | 743 | |
| 744 | - if (! isset($this->entityInsertions[$oid]) && ! isset($this->entityDeletions[$oid]) && isset($this->entityStates[$oid])) { |
|
| 744 | + if ( ! isset($this->entityInsertions[$oid]) && ! isset($this->entityDeletions[$oid]) && isset($this->entityStates[$oid])) { |
|
| 745 | 745 | $this->computeChangeSet($class, $entity); |
| 746 | 746 | } |
| 747 | 747 | } |
@@ -778,13 +778,13 @@ discard block |
||
| 778 | 778 | $targetClass = $this->em->getClassMetadata($targetEntity); |
| 779 | 779 | |
| 780 | 780 | foreach ($unwrappedValue as $key => $entry) { |
| 781 | - if (! ($entry instanceof $targetEntity)) { |
|
| 781 | + if ( ! ($entry instanceof $targetEntity)) { |
|
| 782 | 782 | throw ORMInvalidArgumentException::invalidAssociation($targetClass, $association, $entry); |
| 783 | 783 | } |
| 784 | 784 | |
| 785 | 785 | $state = $this->getEntityState($entry, self::STATE_NEW); |
| 786 | 786 | |
| 787 | - if (! ($entry instanceof $targetEntity)) { |
|
| 787 | + if ( ! ($entry instanceof $targetEntity)) { |
|
| 788 | 788 | throw UnexpectedAssociationValue::create( |
| 789 | 789 | $association->getSourceEntity(), |
| 790 | 790 | $association->getName(), |
@@ -795,7 +795,7 @@ discard block |
||
| 795 | 795 | |
| 796 | 796 | switch ($state) { |
| 797 | 797 | case self::STATE_NEW: |
| 798 | - if (! in_array('persist', $association->getCascade(), true)) { |
|
| 798 | + if ( ! in_array('persist', $association->getCascade(), true)) { |
|
| 799 | 799 | $this->nonCascadedNewDetectedEntities[spl_object_id($entry)] = [$association, $entry]; |
| 800 | 800 | |
| 801 | 801 | break; |
@@ -844,7 +844,7 @@ discard block |
||
| 844 | 844 | $persister = $this->getEntityPersister($class->getClassName()); |
| 845 | 845 | $generationPlan->executeImmediate($this->em, $entity); |
| 846 | 846 | |
| 847 | - if (! $generationPlan->containsDeferred()) { |
|
| 847 | + if ( ! $generationPlan->containsDeferred()) { |
|
| 848 | 848 | $id = $this->em->getIdentifierFlattener()->flattenIdentifier($class, $persister->getIdentifier($entity)); |
| 849 | 849 | $this->entityIdentifiers[$oid] = $id; |
| 850 | 850 | } |
@@ -875,7 +875,7 @@ discard block |
||
| 875 | 875 | { |
| 876 | 876 | $oid = spl_object_id($entity); |
| 877 | 877 | |
| 878 | - if (! isset($this->entityStates[$oid]) || $this->entityStates[$oid] !== self::STATE_MANAGED) { |
|
| 878 | + if ( ! isset($this->entityStates[$oid]) || $this->entityStates[$oid] !== self::STATE_MANAGED) { |
|
| 879 | 879 | throw ORMInvalidArgumentException::entityNotManaged($entity); |
| 880 | 880 | } |
| 881 | 881 | |
@@ -897,7 +897,7 @@ discard block |
||
| 897 | 897 | break; |
| 898 | 898 | |
| 899 | 899 | case $property instanceof FieldMetadata: |
| 900 | - if (! $property->isPrimaryKey() |
|
| 900 | + if ( ! $property->isPrimaryKey() |
|
| 901 | 901 | || ! $property->getValueGenerator() |
| 902 | 902 | || $property->getValueGenerator()->getType() !== GeneratorType::IDENTITY) { |
| 903 | 903 | $actualData[$name] = $property->getValue($entity); |
@@ -911,7 +911,7 @@ discard block |
||
| 911 | 911 | } |
| 912 | 912 | } |
| 913 | 913 | |
| 914 | - if (! isset($this->originalEntityData[$oid])) { |
|
| 914 | + if ( ! isset($this->originalEntityData[$oid])) { |
|
| 915 | 915 | throw new RuntimeException('Cannot call recomputeSingleEntityChangeSet before computeChangeSet on an entity.'); |
| 916 | 916 | } |
| 917 | 917 | |
@@ -929,7 +929,7 @@ discard block |
||
| 929 | 929 | if ($changeSet) { |
| 930 | 930 | if (isset($this->entityChangeSets[$oid])) { |
| 931 | 931 | $this->entityChangeSets[$oid] = array_merge($this->entityChangeSets[$oid], $changeSet); |
| 932 | - } elseif (! isset($this->entityInsertions[$oid])) { |
|
| 932 | + } elseif ( ! isset($this->entityInsertions[$oid])) { |
|
| 933 | 933 | $this->entityChangeSets[$oid] = $changeSet; |
| 934 | 934 | $this->entityUpdates[$oid] = $entity; |
| 935 | 935 | } |
@@ -999,7 +999,7 @@ discard block |
||
| 999 | 999 | $this->recomputeSingleEntityChangeSet($class, $entity); |
| 1000 | 1000 | } |
| 1001 | 1001 | |
| 1002 | - if (! empty($this->entityChangeSets[$oid])) { |
|
| 1002 | + if ( ! empty($this->entityChangeSets[$oid])) { |
|
| 1003 | 1003 | $persister->update($entity); |
| 1004 | 1004 | } |
| 1005 | 1005 | |
@@ -1038,7 +1038,7 @@ discard block |
||
| 1038 | 1038 | |
| 1039 | 1039 | // Entity with this $oid after deletion treated as NEW, even if the $oid |
| 1040 | 1040 | // is obtained by a new entity because the old one went out of scope. |
| 1041 | - if (! $class->isIdentifierComposite()) { |
|
| 1041 | + if ( ! $class->isIdentifierComposite()) { |
|
| 1042 | 1042 | $property = $class->getProperty($class->getSingleIdentifierFieldName()); |
| 1043 | 1043 | |
| 1044 | 1044 | if ($property instanceof FieldMetadata && $property->hasValueGenerator()) { |
@@ -1085,13 +1085,13 @@ discard block |
||
| 1085 | 1085 | // Calculate dependencies for new nodes |
| 1086 | 1086 | while ($class = array_pop($newNodes)) { |
| 1087 | 1087 | foreach ($class->getDeclaredPropertiesIterator() as $property) { |
| 1088 | - if (! ($property instanceof ToOneAssociationMetadata && $property->isOwningSide())) { |
|
| 1088 | + if ( ! ($property instanceof ToOneAssociationMetadata && $property->isOwningSide())) { |
|
| 1089 | 1089 | continue; |
| 1090 | 1090 | } |
| 1091 | 1091 | |
| 1092 | 1092 | $targetClass = $this->em->getClassMetadata($property->getTargetEntity()); |
| 1093 | 1093 | |
| 1094 | - if (! $calc->hasNode($targetClass->getClassName())) { |
|
| 1094 | + if ( ! $calc->hasNode($targetClass->getClassName())) { |
|
| 1095 | 1095 | $calc->addNode($targetClass->getClassName(), $targetClass); |
| 1096 | 1096 | |
| 1097 | 1097 | $newNodes[] = $targetClass; |
@@ -1099,7 +1099,7 @@ discard block |
||
| 1099 | 1099 | |
| 1100 | 1100 | $weight = ! array_filter( |
| 1101 | 1101 | $property->getJoinColumns(), |
| 1102 | - static function (JoinColumnMetadata $joinColumn) { |
|
| 1102 | + static function(JoinColumnMetadata $joinColumn) { |
|
| 1103 | 1103 | return $joinColumn->isNullable(); |
| 1104 | 1104 | } |
| 1105 | 1105 | ); |
@@ -1107,14 +1107,14 @@ discard block |
||
| 1107 | 1107 | $calc->addDependency($targetClass->getClassName(), $class->getClassName(), $weight); |
| 1108 | 1108 | |
| 1109 | 1109 | // If the target class has mapped subclasses, these share the same dependency. |
| 1110 | - if (! $targetClass->getSubClasses()) { |
|
| 1110 | + if ( ! $targetClass->getSubClasses()) { |
|
| 1111 | 1111 | continue; |
| 1112 | 1112 | } |
| 1113 | 1113 | |
| 1114 | 1114 | foreach ($targetClass->getSubClasses() as $subClassName) { |
| 1115 | 1115 | $targetSubClass = $this->em->getClassMetadata($subClassName); |
| 1116 | 1116 | |
| 1117 | - if (! $calc->hasNode($subClassName)) { |
|
| 1117 | + if ( ! $calc->hasNode($subClassName)) { |
|
| 1118 | 1118 | $calc->addNode($targetSubClass->getClassName(), $targetSubClass); |
| 1119 | 1119 | |
| 1120 | 1120 | $newNodes[] = $targetSubClass; |
@@ -1190,7 +1190,7 @@ discard block |
||
| 1190 | 1190 | { |
| 1191 | 1191 | $oid = spl_object_id($entity); |
| 1192 | 1192 | |
| 1193 | - if (! isset($this->entityIdentifiers[$oid])) { |
|
| 1193 | + if ( ! isset($this->entityIdentifiers[$oid])) { |
|
| 1194 | 1194 | throw ORMInvalidArgumentException::entityHasNoIdentity($entity, 'scheduling for update'); |
| 1195 | 1195 | } |
| 1196 | 1196 | |
@@ -1198,7 +1198,7 @@ discard block |
||
| 1198 | 1198 | throw ORMInvalidArgumentException::entityIsRemoved($entity, 'schedule for update'); |
| 1199 | 1199 | } |
| 1200 | 1200 | |
| 1201 | - if (! isset($this->entityUpdates[$oid]) && ! isset($this->entityInsertions[$oid])) { |
|
| 1201 | + if ( ! isset($this->entityUpdates[$oid]) && ! isset($this->entityInsertions[$oid])) { |
|
| 1202 | 1202 | $this->entityUpdates[$oid] = $entity; |
| 1203 | 1203 | } |
| 1204 | 1204 | } |
@@ -1273,7 +1273,7 @@ discard block |
||
| 1273 | 1273 | return; // entity has not been persisted yet, so nothing more to do. |
| 1274 | 1274 | } |
| 1275 | 1275 | |
| 1276 | - if (! $this->isInIdentityMap($entity)) { |
|
| 1276 | + if ( ! $this->isInIdentityMap($entity)) { |
|
| 1277 | 1277 | return; |
| 1278 | 1278 | } |
| 1279 | 1279 | |
@@ -1281,7 +1281,7 @@ discard block |
||
| 1281 | 1281 | |
| 1282 | 1282 | unset($this->entityUpdates[$oid]); |
| 1283 | 1283 | |
| 1284 | - if (! isset($this->entityDeletions[$oid])) { |
|
| 1284 | + if ( ! isset($this->entityDeletions[$oid])) { |
|
| 1285 | 1285 | $this->entityDeletions[$oid] = $entity; |
| 1286 | 1286 | $this->entityStates[$oid] = self::STATE_REMOVED; |
| 1287 | 1287 | } |
@@ -1383,7 +1383,7 @@ discard block |
||
| 1383 | 1383 | $persister = $this->getEntityPersister($class->getClassName()); |
| 1384 | 1384 | $id = $persister->getIdentifier($entity); |
| 1385 | 1385 | |
| 1386 | - if (! $id) { |
|
| 1386 | + if ( ! $id) { |
|
| 1387 | 1387 | return self::STATE_NEW; |
| 1388 | 1388 | } |
| 1389 | 1389 | |
@@ -1741,7 +1741,7 @@ discard block |
||
| 1741 | 1741 | $class = $this->em->getClassMetadata(get_class($entity)); |
| 1742 | 1742 | |
| 1743 | 1743 | foreach ($class->getDeclaredPropertiesIterator() as $association) { |
| 1744 | - if (! ($association instanceof AssociationMetadata && in_array('refresh', $association->getCascade(), true))) { |
|
| 1744 | + if ( ! ($association instanceof AssociationMetadata && in_array('refresh', $association->getCascade(), true))) { |
|
| 1745 | 1745 | continue; |
| 1746 | 1746 | } |
| 1747 | 1747 | |
@@ -1788,7 +1788,7 @@ discard block |
||
| 1788 | 1788 | } |
| 1789 | 1789 | |
| 1790 | 1790 | foreach ($class->getDeclaredPropertiesIterator() as $association) { |
| 1791 | - if (! ($association instanceof AssociationMetadata && in_array('persist', $association->getCascade(), true))) { |
|
| 1791 | + if ( ! ($association instanceof AssociationMetadata && in_array('persist', $association->getCascade(), true))) { |
|
| 1792 | 1792 | continue; |
| 1793 | 1793 | } |
| 1794 | 1794 | |
@@ -1804,7 +1804,7 @@ discard block |
||
| 1804 | 1804 | |
| 1805 | 1805 | case $relatedEntities instanceof Collection: |
| 1806 | 1806 | case is_array($relatedEntities): |
| 1807 | - if (! ($association instanceof ToManyAssociationMetadata)) { |
|
| 1807 | + if ( ! ($association instanceof ToManyAssociationMetadata)) { |
|
| 1808 | 1808 | throw ORMInvalidArgumentException::invalidAssociation( |
| 1809 | 1809 | $this->em->getClassMetadata($targetEntity), |
| 1810 | 1810 | $association, |
@@ -1819,7 +1819,7 @@ discard block |
||
| 1819 | 1819 | break; |
| 1820 | 1820 | |
| 1821 | 1821 | case $relatedEntities !== null: |
| 1822 | - if (! $relatedEntities instanceof $targetEntity) { |
|
| 1822 | + if ( ! $relatedEntities instanceof $targetEntity) { |
|
| 1823 | 1823 | throw ORMInvalidArgumentException::invalidAssociation( |
| 1824 | 1824 | $this->em->getClassMetadata($targetEntity), |
| 1825 | 1825 | $association, |
@@ -1848,7 +1848,7 @@ discard block |
||
| 1848 | 1848 | $class = $this->em->getClassMetadata(get_class($entity)); |
| 1849 | 1849 | |
| 1850 | 1850 | foreach ($class->getDeclaredPropertiesIterator() as $association) { |
| 1851 | - if (! ($association instanceof AssociationMetadata && in_array('remove', $association->getCascade(), true))) { |
|
| 1851 | + if ( ! ($association instanceof AssociationMetadata && in_array('remove', $association->getCascade(), true))) { |
|
| 1852 | 1852 | continue; |
| 1853 | 1853 | } |
| 1854 | 1854 | |
@@ -1907,7 +1907,7 @@ discard block |
||
| 1907 | 1907 | |
| 1908 | 1908 | switch (true) { |
| 1909 | 1909 | case $lockMode === LockMode::OPTIMISTIC: |
| 1910 | - if (! $class->isVersioned()) { |
|
| 1910 | + if ( ! $class->isVersioned()) { |
|
| 1911 | 1911 | throw OptimisticLockException::notVersioned($class->getClassName()); |
| 1912 | 1912 | } |
| 1913 | 1913 | |
@@ -1930,7 +1930,7 @@ discard block |
||
| 1930 | 1930 | case $lockMode === LockMode::NONE: |
| 1931 | 1931 | case $lockMode === LockMode::PESSIMISTIC_READ: |
| 1932 | 1932 | case $lockMode === LockMode::PESSIMISTIC_WRITE: |
| 1933 | - if (! $this->em->getConnection()->isTransactionActive()) { |
|
| 1933 | + if ( ! $this->em->getConnection()->isTransactionActive()) { |
|
| 1934 | 1934 | throw TransactionRequiredException::transactionRequired(); |
| 1935 | 1935 | } |
| 1936 | 1936 | |
@@ -2088,7 +2088,7 @@ discard block |
||
| 2088 | 2088 | $entity->addPropertyChangedListener($this); |
| 2089 | 2089 | } |
| 2090 | 2090 | } else { |
| 2091 | - if (! isset($hints[Query::HINT_REFRESH]) |
|
| 2091 | + if ( ! isset($hints[Query::HINT_REFRESH]) |
|
| 2092 | 2092 | || (isset($hints[Query::HINT_REFRESH_ENTITY]) && $hints[Query::HINT_REFRESH_ENTITY] !== $entity)) { |
| 2093 | 2093 | return $entity; |
| 2094 | 2094 | } |
@@ -2136,7 +2136,7 @@ discard block |
||
| 2136 | 2136 | } |
| 2137 | 2137 | |
| 2138 | 2138 | foreach ($class->getDeclaredPropertiesIterator() as $field => $association) { |
| 2139 | - if (! ($association instanceof AssociationMetadata)) { |
|
| 2139 | + if ( ! ($association instanceof AssociationMetadata)) { |
|
| 2140 | 2140 | continue; |
| 2141 | 2141 | } |
| 2142 | 2142 | |
@@ -2185,7 +2185,7 @@ discard block |
||
| 2185 | 2185 | continue; |
| 2186 | 2186 | } |
| 2187 | 2187 | |
| 2188 | - if (! $association->isOwningSide()) { |
|
| 2188 | + if ( ! $association->isOwningSide()) { |
|
| 2189 | 2189 | // use the given entity association |
| 2190 | 2190 | if (isset($data[$field]) && is_object($data[$field]) && |
| 2191 | 2191 | isset($this->entityStates[spl_object_id($data[$field])])) { |
@@ -2235,7 +2235,7 @@ discard block |
||
| 2235 | 2235 | $associatedId[$targetField] = $joinColumnValue; |
| 2236 | 2236 | } |
| 2237 | 2237 | |
| 2238 | - if (! $associatedId) { |
|
| 2238 | + if ( ! $associatedId) { |
|
| 2239 | 2239 | // Foreign key is NULL |
| 2240 | 2240 | $association->setValue($entity, null); |
| 2241 | 2241 | $this->originalEntityData[$oid][$field] = null; |
@@ -2244,7 +2244,7 @@ discard block |
||
| 2244 | 2244 | } |
| 2245 | 2245 | |
| 2246 | 2246 | // @todo guilhermeblanco Can we remove the need of this somehow? |
| 2247 | - if (! isset($hints['fetchMode'][$class->getClassName()][$field])) { |
|
| 2247 | + if ( ! isset($hints['fetchMode'][$class->getClassName()][$field])) { |
|
| 2248 | 2248 | $hints['fetchMode'][$class->getClassName()][$field] = $association->getFetchMode(); |
| 2249 | 2249 | } |
| 2250 | 2250 | |
@@ -2261,7 +2261,7 @@ discard block |
||
| 2261 | 2261 | // If this is an uninitialized proxy, we are deferring eager loads, |
| 2262 | 2262 | // this association is marked as eager fetch, and its an uninitialized proxy (wtf!) |
| 2263 | 2263 | // then we can append this entity for eager loading! |
| 2264 | - if (! $targetClass->isIdentifierComposite() && |
|
| 2264 | + if ( ! $targetClass->isIdentifierComposite() && |
|
| 2265 | 2265 | $newValue instanceof GhostObjectInterface && |
| 2266 | 2266 | isset($hints[self::HINT_DEFEREAGERLOAD]) && |
| 2267 | 2267 | $hints['fetchMode'][$class->getClassName()][$field] === FetchMode::EAGER && |
@@ -2344,7 +2344,7 @@ discard block |
||
| 2344 | 2344 | |
| 2345 | 2345 | public function triggerEagerLoads() |
| 2346 | 2346 | { |
| 2347 | - if (! $this->eagerLoadingEntities) { |
|
| 2347 | + if ( ! $this->eagerLoadingEntities) { |
|
| 2348 | 2348 | return; |
| 2349 | 2349 | } |
| 2350 | 2350 | |
@@ -2353,7 +2353,7 @@ discard block |
||
| 2353 | 2353 | $this->eagerLoadingEntities = []; |
| 2354 | 2354 | |
| 2355 | 2355 | foreach ($eagerLoadingEntities as $entityName => $ids) { |
| 2356 | - if (! $ids) { |
|
| 2356 | + if ( ! $ids) { |
|
| 2357 | 2357 | continue; |
| 2358 | 2358 | } |
| 2359 | 2359 | |
@@ -2651,7 +2651,7 @@ discard block |
||
| 2651 | 2651 | { |
| 2652 | 2652 | $class = $this->em->getClassMetadata(get_class($entity)); |
| 2653 | 2653 | |
| 2654 | - if (! $class->getProperty($propertyName)) { |
|
| 2654 | + if ( ! $class->getProperty($propertyName)) { |
|
| 2655 | 2655 | return; // ignore non-persistent fields |
| 2656 | 2656 | } |
| 2657 | 2657 | |
@@ -2660,7 +2660,7 @@ discard block |
||
| 2660 | 2660 | // Update changeset and mark entity for synchronization |
| 2661 | 2661 | $this->entityChangeSets[$oid][$propertyName] = [$oldValue, $newValue]; |
| 2662 | 2662 | |
| 2663 | - if (! isset($this->scheduledForSynchronization[$class->getRootClassName()][$oid])) { |
|
| 2663 | + if ( ! isset($this->scheduledForSynchronization[$class->getRootClassName()][$oid])) { |
|
| 2664 | 2664 | $this->scheduleForSynchronization($entity); |
| 2665 | 2665 | } |
| 2666 | 2666 | } |
@@ -2742,7 +2742,7 @@ discard block |
||
| 2742 | 2742 | */ |
| 2743 | 2743 | private static function objToStr($obj) |
| 2744 | 2744 | { |
| 2745 | - return method_exists($obj, '__toString') ? (string) $obj : get_class($obj) . '@' . spl_object_id($obj); |
|
| 2745 | + return method_exists($obj, '__toString') ? (string) $obj : get_class($obj).'@'.spl_object_id($obj); |
|
| 2746 | 2746 | } |
| 2747 | 2747 | |
| 2748 | 2748 | /** |
@@ -2757,7 +2757,7 @@ discard block |
||
| 2757 | 2757 | */ |
| 2758 | 2758 | public function markReadOnly($object) |
| 2759 | 2759 | { |
| 2760 | - if (! is_object($object) || ! $this->isInIdentityMap($object)) { |
|
| 2760 | + if ( ! is_object($object) || ! $this->isInIdentityMap($object)) { |
|
| 2761 | 2761 | throw ORMInvalidArgumentException::readOnlyRequiresManagedEntity($object); |
| 2762 | 2762 | } |
| 2763 | 2763 | |
@@ -2775,7 +2775,7 @@ discard block |
||
| 2775 | 2775 | */ |
| 2776 | 2776 | public function isReadOnly($object) |
| 2777 | 2777 | { |
| 2778 | - if (! is_object($object)) { |
|
| 2778 | + if ( ! is_object($object)) { |
|
| 2779 | 2779 | throw ORMInvalidArgumentException::readOnlyRequiresManagedEntity($object); |
| 2780 | 2780 | } |
| 2781 | 2781 | |
@@ -2787,7 +2787,7 @@ discard block |
||
| 2787 | 2787 | */ |
| 2788 | 2788 | private function afterTransactionComplete() |
| 2789 | 2789 | { |
| 2790 | - $this->performCallbackOnCachedPersister(static function (CachedPersister $persister) { |
|
| 2790 | + $this->performCallbackOnCachedPersister(static function(CachedPersister $persister) { |
|
| 2791 | 2791 | $persister->afterTransactionComplete(); |
| 2792 | 2792 | }); |
| 2793 | 2793 | } |
@@ -2797,7 +2797,7 @@ discard block |
||
| 2797 | 2797 | */ |
| 2798 | 2798 | private function afterTransactionRolledBack() |
| 2799 | 2799 | { |
| 2800 | - $this->performCallbackOnCachedPersister(static function (CachedPersister $persister) { |
|
| 2800 | + $this->performCallbackOnCachedPersister(static function(CachedPersister $persister) { |
|
| 2801 | 2801 | $persister->afterTransactionRolledBack(); |
| 2802 | 2802 | }); |
| 2803 | 2803 | } |
@@ -2807,7 +2807,7 @@ discard block |
||
| 2807 | 2807 | */ |
| 2808 | 2808 | private function performCallbackOnCachedPersister(callable $callback) |
| 2809 | 2809 | { |
| 2810 | - if (! $this->hasCache) { |
|
| 2810 | + if ( ! $this->hasCache) { |
|
| 2811 | 2811 | return; |
| 2812 | 2812 | } |
| 2813 | 2813 | |