Passed
Pull Request — master (#7172)
by Gabriel
12:42
created
lib/Doctrine/ORM/Tools/Pagination/Paginator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Tools\Pagination;
6 6
 
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
         /** @var Query $countQuery */
222 222
         $countQuery = $this->cloneQuery($this->query);
223 223
 
224
-        if (! $countQuery->hasHint(CountWalker::HINT_DISTINCT)) {
224
+        if ( ! $countQuery->hasHint(CountWalker::HINT_DISTINCT)) {
225 225
             $countQuery->setHint(CountWalker::HINT_DISTINCT, true);
226 226
         }
227 227
 
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
         foreach ($parameters as $key => $parameter) {
249 249
             $parameterName = $parameter->getName();
250 250
 
251
-            if (! array_key_exists($parameterName, $parameterMappings)) {
251
+            if ( ! array_key_exists($parameterName, $parameterMappings)) {
252 252
                 unset($parameters[$key]);
253 253
             }
254 254
         }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/UnitOfWork.php 1 patch
Spacing   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM;
6 6
 
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
 
336 336
         $this->computeChangeSets();
337 337
 
338
-        if (! ($this->entityInsertions ||
338
+        if ( ! ($this->entityInsertions ||
339 339
                 $this->entityDeletions ||
340 340
                 $this->entityUpdates ||
341 341
                 $this->collectionUpdates ||
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
             // Entity deletions come last and need to be in reverse commit order
395 395
             if ($this->entityDeletions) {
396 396
                 foreach (array_reverse($commitOrder) as $committedEntityName) {
397
-                    if (! $this->entityDeletions) {
397
+                    if ( ! $this->entityDeletions) {
398 398
                         break; // just a performance optimisation
399 399
                     }
400 400
 
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
         $oid  = spl_object_id($entity);
478 478
         $data = [];
479 479
 
480
-        if (! isset($this->entityChangeSets[$oid])) {
480
+        if ( ! isset($this->entityChangeSets[$oid])) {
481 481
             return $data;
482 482
         }
483 483
 
@@ -558,12 +558,12 @@  discard block
 block discarded – undo
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
         }
565 565
 
566
-        if (! isset($this->originalEntityData[$oid])) {
566
+        if ( ! isset($this->originalEntityData[$oid])) {
567 567
             // Entity is either NEW or MANAGED but not yet fully persisted (only has an id).
568 568
             // These result in an INSERT.
569 569
             $this->originalEntityData[$oid] = $actualData;
@@ -590,7 +590,7 @@  discard block
 block discarded – undo
590 590
 
591 591
             foreach ($actualData as $propName => $actualValue) {
592 592
                 // skip field, its a partially omitted one!
593
-                if (! array_key_exists($propName, $originalData)) {
593
+                if ( ! array_key_exists($propName, $originalData)) {
594 594
                     continue;
595 595
                 }
596 596
 
@@ -612,7 +612,7 @@  discard block
 block discarded – undo
612 612
                     if ($owner === null) { // cloned
613 613
                         $actualValue->setOwner($entity, $property);
614 614
                     } elseif ($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
 block discarded – undo
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
 block discarded – undo
673 673
 
674 674
         // Look for changes in associations of the entity
675 675
         foreach ($class->getDeclaredPropertiesIterator() as $property) {
676
-            if (! $property instanceof AssociationMetadata) {
676
+            if ( ! $property instanceof AssociationMetadata) {
677 677
                 continue;
678 678
             }
679 679
 
@@ -740,7 +740,7 @@  discard block
 block discarded – undo
740 740
                 // Only MANAGED entities that are NOT SCHEDULED FOR INSERTION OR DELETION are processed here.
741 741
                 $oid = spl_object_id($entity);
742 742
 
743
-                if (! isset($this->entityInsertions[$oid]) && ! isset($this->entityDeletions[$oid]) && isset($this->entityStates[$oid])) {
743
+                if ( ! isset($this->entityInsertions[$oid]) && ! isset($this->entityDeletions[$oid]) && isset($this->entityStates[$oid])) {
744 744
                     $this->computeChangeSet($class, $entity);
745 745
                 }
746 746
             }
@@ -777,13 +777,13 @@  discard block
 block discarded – undo
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(),
@@ -794,7 +794,7 @@  discard block
 block discarded – undo
794 794
 
795 795
             switch ($state) {
796 796
                 case self::STATE_NEW:
797
-                    if (! in_array('persist', $association->getCascade(), true)) {
797
+                    if ( ! in_array('persist', $association->getCascade(), true)) {
798 798
                         $this->nonCascadedNewDetectedEntities[spl_object_id($entry)] = [$association, $entry];
799 799
 
800 800
                         break;
@@ -843,7 +843,7 @@  discard block
 block discarded – undo
843 843
         $persister      = $this->getEntityPersister($class->getClassName());
844 844
         $generationPlan->executeImmediate($this->em, $entity);
845 845
 
846
-        if (! $generationPlan->containsDeferred()) {
846
+        if ( ! $generationPlan->containsDeferred()) {
847 847
             $id                            = $this->em->getIdentifierFlattener()->flattenIdentifier($class, $persister->getIdentifier($entity));
848 848
             $this->entityIdentifiers[$oid] = $id;
849 849
         }
@@ -874,7 +874,7 @@  discard block
 block discarded – undo
874 874
     {
875 875
         $oid = spl_object_id($entity);
876 876
 
877
-        if (! isset($this->entityStates[$oid]) || $this->entityStates[$oid] !== self::STATE_MANAGED) {
877
+        if ( ! isset($this->entityStates[$oid]) || $this->entityStates[$oid] !== self::STATE_MANAGED) {
878 878
             throw ORMInvalidArgumentException::entityNotManaged($entity);
879 879
         }
880 880
 
@@ -896,7 +896,7 @@  discard block
 block discarded – undo
896 896
                     break;
897 897
 
898 898
                 case ($property instanceof FieldMetadata):
899
-                    if (! $property->isPrimaryKey()
899
+                    if ( ! $property->isPrimaryKey()
900 900
                         || ! $property->getValueGenerator()
901 901
                         || $property->getValueGenerator()->getType() !== GeneratorType::IDENTITY) {
902 902
                         $actualData[$name] = $property->getValue($entity);
@@ -910,7 +910,7 @@  discard block
 block discarded – undo
910 910
             }
911 911
         }
912 912
 
913
-        if (! isset($this->originalEntityData[$oid])) {
913
+        if ( ! isset($this->originalEntityData[$oid])) {
914 914
             throw new \RuntimeException('Cannot call recomputeSingleEntityChangeSet before computeChangeSet on an entity.');
915 915
         }
916 916
 
@@ -928,7 +928,7 @@  discard block
 block discarded – undo
928 928
         if ($changeSet) {
929 929
             if (isset($this->entityChangeSets[$oid])) {
930 930
                 $this->entityChangeSets[$oid] = array_merge($this->entityChangeSets[$oid], $changeSet);
931
-            } elseif (! isset($this->entityInsertions[$oid])) {
931
+            } elseif ( ! isset($this->entityInsertions[$oid])) {
932 932
                 $this->entityChangeSets[$oid] = $changeSet;
933 933
                 $this->entityUpdates[$oid]    = $entity;
934 934
             }
@@ -998,7 +998,7 @@  discard block
 block discarded – undo
998 998
                 $this->recomputeSingleEntityChangeSet($class, $entity);
999 999
             }
1000 1000
 
1001
-            if (! empty($this->entityChangeSets[$oid])) {
1001
+            if ( ! empty($this->entityChangeSets[$oid])) {
1002 1002
 //                echo 'Update: ';
1003 1003
 //                \Doctrine\Common\Util\Debug::dump($this->entityChangeSets[$oid], 3);
1004 1004
 
@@ -1041,7 +1041,7 @@  discard block
 block discarded – undo
1041 1041
             // Entity with this $oid after deletion treated as NEW, even if the $oid
1042 1042
             // is obtained by a new entity because the old one went out of scope.
1043 1043
             //$this->entityStates[$oid] = self::STATE_NEW;
1044
-            if (! $class->isIdentifierComposite()) {
1044
+            if ( ! $class->isIdentifierComposite()) {
1045 1045
                 $property = $class->getProperty($class->getSingleIdentifierFieldName());
1046 1046
 
1047 1047
                 if ($property instanceof FieldMetadata && $property->hasValueGenerator()) {
@@ -1088,13 +1088,13 @@  discard block
 block discarded – undo
1088 1088
         // Calculate dependencies for new nodes
1089 1089
         while ($class = array_pop($newNodes)) {
1090 1090
             foreach ($class->getDeclaredPropertiesIterator() as $property) {
1091
-                if (! ($property instanceof ToOneAssociationMetadata && $property->isOwningSide())) {
1091
+                if ( ! ($property instanceof ToOneAssociationMetadata && $property->isOwningSide())) {
1092 1092
                     continue;
1093 1093
                 }
1094 1094
 
1095 1095
                 $targetClass = $this->em->getClassMetadata($property->getTargetEntity());
1096 1096
 
1097
-                if (! $calc->hasNode($targetClass->getClassName())) {
1097
+                if ( ! $calc->hasNode($targetClass->getClassName())) {
1098 1098
                     $calc->addNode($targetClass->getClassName(), $targetClass);
1099 1099
 
1100 1100
                     $newNodes[] = $targetClass;
@@ -1102,7 +1102,7 @@  discard block
 block discarded – undo
1102 1102
 
1103 1103
                 $weight = ! array_filter(
1104 1104
                     $property->getJoinColumns(),
1105
-                    function (JoinColumnMetadata $joinColumn) {
1105
+                    function(JoinColumnMetadata $joinColumn) {
1106 1106
                         return $joinColumn->isNullable();
1107 1107
                     }
1108 1108
                 );
@@ -1110,14 +1110,14 @@  discard block
 block discarded – undo
1110 1110
                 $calc->addDependency($targetClass->getClassName(), $class->getClassName(), $weight);
1111 1111
 
1112 1112
                 // If the target class has mapped subclasses, these share the same dependency.
1113
-                if (! $targetClass->getSubClasses()) {
1113
+                if ( ! $targetClass->getSubClasses()) {
1114 1114
                     continue;
1115 1115
                 }
1116 1116
 
1117 1117
                 foreach ($targetClass->getSubClasses() as $subClassName) {
1118 1118
                     $targetSubClass = $this->em->getClassMetadata($subClassName);
1119 1119
 
1120
-                    if (! $calc->hasNode($subClassName)) {
1120
+                    if ( ! $calc->hasNode($subClassName)) {
1121 1121
                         $calc->addNode($targetSubClass->getClassName(), $targetSubClass);
1122 1122
 
1123 1123
                         $newNodes[] = $targetSubClass;
@@ -1193,7 +1193,7 @@  discard block
 block discarded – undo
1193 1193
     {
1194 1194
         $oid = spl_object_id($entity);
1195 1195
 
1196
-        if (! isset($this->entityIdentifiers[$oid])) {
1196
+        if ( ! isset($this->entityIdentifiers[$oid])) {
1197 1197
             throw ORMInvalidArgumentException::entityHasNoIdentity($entity, 'scheduling for update');
1198 1198
         }
1199 1199
 
@@ -1201,7 +1201,7 @@  discard block
 block discarded – undo
1201 1201
             throw ORMInvalidArgumentException::entityIsRemoved($entity, 'schedule for update');
1202 1202
         }
1203 1203
 
1204
-        if (! isset($this->entityUpdates[$oid]) && ! isset($this->entityInsertions[$oid])) {
1204
+        if ( ! isset($this->entityUpdates[$oid]) && ! isset($this->entityInsertions[$oid])) {
1205 1205
             $this->entityUpdates[$oid] = $entity;
1206 1206
         }
1207 1207
     }
@@ -1277,7 +1277,7 @@  discard block
 block discarded – undo
1277 1277
             return; // entity has not been persisted yet, so nothing more to do.
1278 1278
         }
1279 1279
 
1280
-        if (! $this->isInIdentityMap($entity)) {
1280
+        if ( ! $this->isInIdentityMap($entity)) {
1281 1281
             return;
1282 1282
         }
1283 1283
 
@@ -1285,7 +1285,7 @@  discard block
 block discarded – undo
1285 1285
 
1286 1286
         unset($this->entityUpdates[$oid]);
1287 1287
 
1288
-        if (! isset($this->entityDeletions[$oid])) {
1288
+        if ( ! isset($this->entityDeletions[$oid])) {
1289 1289
             $this->entityDeletions[$oid] = $entity;
1290 1290
             $this->entityStates[$oid]    = self::STATE_REMOVED;
1291 1291
         }
@@ -1387,7 +1387,7 @@  discard block
 block discarded – undo
1387 1387
         $persister = $this->getEntityPersister($class->getClassName());
1388 1388
         $id        = $persister->getIdentifier($entity);
1389 1389
 
1390
-        if (! $id) {
1390
+        if ( ! $id) {
1391 1391
             return self::STATE_NEW;
1392 1392
         }
1393 1393
 
@@ -1747,7 +1747,7 @@  discard block
 block discarded – undo
1747 1747
         $class = $this->em->getClassMetadata(get_class($entity));
1748 1748
 
1749 1749
         foreach ($class->getDeclaredPropertiesIterator() as $association) {
1750
-            if (! ($association instanceof AssociationMetadata && in_array('refresh', $association->getCascade(), true))) {
1750
+            if ( ! ($association instanceof AssociationMetadata && in_array('refresh', $association->getCascade(), true))) {
1751 1751
                 continue;
1752 1752
             }
1753 1753
 
@@ -1794,7 +1794,7 @@  discard block
 block discarded – undo
1794 1794
         }
1795 1795
 
1796 1796
         foreach ($class->getDeclaredPropertiesIterator() as $association) {
1797
-            if (! ($association instanceof AssociationMetadata && in_array('persist', $association->getCascade(), true))) {
1797
+            if ( ! ($association instanceof AssociationMetadata && in_array('persist', $association->getCascade(), true))) {
1798 1798
                 continue;
1799 1799
             }
1800 1800
 
@@ -1810,7 +1810,7 @@  discard block
 block discarded – undo
1810 1810
 
1811 1811
                 case ($relatedEntities instanceof Collection):
1812 1812
                 case (is_array($relatedEntities)):
1813
-                    if (! ($association instanceof ToManyAssociationMetadata)) {
1813
+                    if ( ! ($association instanceof ToManyAssociationMetadata)) {
1814 1814
                         throw ORMInvalidArgumentException::invalidAssociation(
1815 1815
                             $this->em->getClassMetadata($targetEntity),
1816 1816
                             $association,
@@ -1825,7 +1825,7 @@  discard block
 block discarded – undo
1825 1825
                     break;
1826 1826
 
1827 1827
                 case ($relatedEntities !== null):
1828
-                    if (! $relatedEntities instanceof $targetEntity) {
1828
+                    if ( ! $relatedEntities instanceof $targetEntity) {
1829 1829
                         throw ORMInvalidArgumentException::invalidAssociation(
1830 1830
                             $this->em->getClassMetadata($targetEntity),
1831 1831
                             $association,
@@ -1854,7 +1854,7 @@  discard block
 block discarded – undo
1854 1854
         $class             = $this->em->getClassMetadata(get_class($entity));
1855 1855
 
1856 1856
         foreach ($class->getDeclaredPropertiesIterator() as $association) {
1857
-            if (! ($association instanceof AssociationMetadata && in_array('remove', $association->getCascade(), true))) {
1857
+            if ( ! ($association instanceof AssociationMetadata && in_array('remove', $association->getCascade(), true))) {
1858 1858
                 continue;
1859 1859
             }
1860 1860
 
@@ -1913,7 +1913,7 @@  discard block
 block discarded – undo
1913 1913
 
1914 1914
         switch (true) {
1915 1915
             case $lockMode === LockMode::OPTIMISTIC:
1916
-                if (! $class->isVersioned()) {
1916
+                if ( ! $class->isVersioned()) {
1917 1917
                     throw OptimisticLockException::notVersioned($class->getClassName());
1918 1918
                 }
1919 1919
 
@@ -1936,7 +1936,7 @@  discard block
 block discarded – undo
1936 1936
             case $lockMode === LockMode::NONE:
1937 1937
             case $lockMode === LockMode::PESSIMISTIC_READ:
1938 1938
             case $lockMode === LockMode::PESSIMISTIC_WRITE:
1939
-                if (! $this->em->getConnection()->isTransactionActive()) {
1939
+                if ( ! $this->em->getConnection()->isTransactionActive()) {
1940 1940
                     throw TransactionRequiredException::transactionRequired();
1941 1941
                 }
1942 1942
 
@@ -2095,7 +2095,7 @@  discard block
 block discarded – undo
2095 2095
                     $entity->addPropertyChangedListener($this);
2096 2096
                 }
2097 2097
             } else {
2098
-                if (! isset($hints[Query::HINT_REFRESH])
2098
+                if ( ! isset($hints[Query::HINT_REFRESH])
2099 2099
                     || (isset($hints[Query::HINT_REFRESH_ENTITY]) && $hints[Query::HINT_REFRESH_ENTITY] !== $entity)) {
2100 2100
                     return $entity;
2101 2101
                 }
@@ -2143,7 +2143,7 @@  discard block
 block discarded – undo
2143 2143
         }
2144 2144
 
2145 2145
         foreach ($class->getDeclaredPropertiesIterator() as $field => $association) {
2146
-            if (! ($association instanceof AssociationMetadata)) {
2146
+            if ( ! ($association instanceof AssociationMetadata)) {
2147 2147
                 continue;
2148 2148
             }
2149 2149
 
@@ -2192,7 +2192,7 @@  discard block
 block discarded – undo
2192 2192
                 continue;
2193 2193
             }
2194 2194
 
2195
-            if (! $association->isOwningSide()) {
2195
+            if ( ! $association->isOwningSide()) {
2196 2196
                 // use the given entity association
2197 2197
                 if (isset($data[$field]) && is_object($data[$field]) &&
2198 2198
                     isset($this->entityStates[spl_object_id($data[$field])])) {
@@ -2242,7 +2242,7 @@  discard block
 block discarded – undo
2242 2242
                 $associatedId[$targetField] = $joinColumnValue;
2243 2243
             }
2244 2244
 
2245
-            if (! $associatedId) {
2245
+            if ( ! $associatedId) {
2246 2246
                 // Foreign key is NULL
2247 2247
                 $association->setValue($entity, null);
2248 2248
                 $this->originalEntityData[$oid][$field] = null;
@@ -2251,7 +2251,7 @@  discard block
 block discarded – undo
2251 2251
             }
2252 2252
 
2253 2253
             // @todo guilhermeblanco Can we remove the need of this somehow?
2254
-            if (! isset($hints['fetchMode'][$class->getClassName()][$field])) {
2254
+            if ( ! isset($hints['fetchMode'][$class->getClassName()][$field])) {
2255 2255
                 $hints['fetchMode'][$class->getClassName()][$field] = $association->getFetchMode();
2256 2256
             }
2257 2257
 
@@ -2268,7 +2268,7 @@  discard block
 block discarded – undo
2268 2268
                     // If this is an uninitialized proxy, we are deferring eager loads,
2269 2269
                     // this association is marked as eager fetch, and its an uninitialized proxy (wtf!)
2270 2270
                     // then we can append this entity for eager loading!
2271
-                    if (! $targetClass->isIdentifierComposite() &&
2271
+                    if ( ! $targetClass->isIdentifierComposite() &&
2272 2272
                         $newValue instanceof GhostObjectInterface &&
2273 2273
                         isset($hints[self::HINT_DEFEREAGERLOAD]) &&
2274 2274
                         $hints['fetchMode'][$class->getClassName()][$field] === FetchMode::EAGER &&
@@ -2351,7 +2351,7 @@  discard block
 block discarded – undo
2351 2351
 
2352 2352
     public function triggerEagerLoads()
2353 2353
     {
2354
-        if (! $this->eagerLoadingEntities) {
2354
+        if ( ! $this->eagerLoadingEntities) {
2355 2355
             return;
2356 2356
         }
2357 2357
 
@@ -2360,7 +2360,7 @@  discard block
 block discarded – undo
2360 2360
         $this->eagerLoadingEntities = [];
2361 2361
 
2362 2362
         foreach ($eagerLoadingEntities as $entityName => $ids) {
2363
-            if (! $ids) {
2363
+            if ( ! $ids) {
2364 2364
                 continue;
2365 2365
             }
2366 2366
 
@@ -2658,7 +2658,7 @@  discard block
 block discarded – undo
2658 2658
     {
2659 2659
         $class = $this->em->getClassMetadata(get_class($entity));
2660 2660
 
2661
-        if (! $class->getProperty($propertyName)) {
2661
+        if ( ! $class->getProperty($propertyName)) {
2662 2662
             return; // ignore non-persistent fields
2663 2663
         }
2664 2664
 
@@ -2667,7 +2667,7 @@  discard block
 block discarded – undo
2667 2667
         // Update changeset and mark entity for synchronization
2668 2668
         $this->entityChangeSets[$oid][$propertyName] = [$oldValue, $newValue];
2669 2669
 
2670
-        if (! isset($this->scheduledForSynchronization[$class->getRootClassName()][$oid])) {
2670
+        if ( ! isset($this->scheduledForSynchronization[$class->getRootClassName()][$oid])) {
2671 2671
             $this->scheduleForSynchronization($entity);
2672 2672
         }
2673 2673
     }
@@ -2749,7 +2749,7 @@  discard block
 block discarded – undo
2749 2749
      */
2750 2750
     private static function objToStr($obj)
2751 2751
     {
2752
-        return method_exists($obj, '__toString') ? (string) $obj : get_class($obj) . '@' . spl_object_id($obj);
2752
+        return method_exists($obj, '__toString') ? (string) $obj : get_class($obj).'@'.spl_object_id($obj);
2753 2753
     }
2754 2754
 
2755 2755
     /**
@@ -2764,7 +2764,7 @@  discard block
 block discarded – undo
2764 2764
      */
2765 2765
     public function markReadOnly($object)
2766 2766
     {
2767
-        if (! is_object($object) || ! $this->isInIdentityMap($object)) {
2767
+        if ( ! is_object($object) || ! $this->isInIdentityMap($object)) {
2768 2768
             throw ORMInvalidArgumentException::readOnlyRequiresManagedEntity($object);
2769 2769
         }
2770 2770
 
@@ -2782,7 +2782,7 @@  discard block
 block discarded – undo
2782 2782
      */
2783 2783
     public function isReadOnly($object)
2784 2784
     {
2785
-        if (! is_object($object)) {
2785
+        if ( ! is_object($object)) {
2786 2786
             throw ORMInvalidArgumentException::readOnlyRequiresManagedEntity($object);
2787 2787
         }
2788 2788
 
@@ -2794,7 +2794,7 @@  discard block
 block discarded – undo
2794 2794
      */
2795 2795
     private function afterTransactionComplete()
2796 2796
     {
2797
-        $this->performCallbackOnCachedPersister(function (CachedPersister $persister) {
2797
+        $this->performCallbackOnCachedPersister(function(CachedPersister $persister) {
2798 2798
             $persister->afterTransactionComplete();
2799 2799
         });
2800 2800
     }
@@ -2804,7 +2804,7 @@  discard block
 block discarded – undo
2804 2804
      */
2805 2805
     private function afterTransactionRolledBack()
2806 2806
     {
2807
-        $this->performCallbackOnCachedPersister(function (CachedPersister $persister) {
2807
+        $this->performCallbackOnCachedPersister(function(CachedPersister $persister) {
2808 2808
             $persister->afterTransactionRolledBack();
2809 2809
         });
2810 2810
     }
@@ -2814,7 +2814,7 @@  discard block
 block discarded – undo
2814 2814
      */
2815 2815
     private function performCallbackOnCachedPersister(callable $callback)
2816 2816
     {
2817
-        if (! $this->hasCache) {
2817
+        if ( ! $this->hasCache) {
2818 2818
             return;
2819 2819
         }
2820 2820
 
Please login to merge, or discard this patch.