Failed Conditions
Pull Request — develop (#6600)
by Mike
62:56
created
lib/Doctrine/ORM/Sequencing/IdentityGenerator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 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\Sequencing;
6 6
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/ORMInvalidArgumentException.php 1 patch
Spacing   +13 added lines, -13 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
 use Doctrine\ORM\Mapping\AssociationMetadata;
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
      */
22 22
     static public function scheduleInsertForManagedEntity($entity)
23 23
     {
24
-        return new self("A managed+dirty entity " . self::objToStr($entity) . " can not be scheduled for insertion.");
24
+        return new self("A managed+dirty entity ".self::objToStr($entity)." can not be scheduled for insertion.");
25 25
     }
26 26
 
27 27
     /**
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      */
32 32
     static public function scheduleInsertForRemovedEntity($entity)
33 33
     {
34
-        return new self("Removed entity " . self::objToStr($entity) . " can not be scheduled for insertion.");
34
+        return new self("Removed entity ".self::objToStr($entity)." can not be scheduled for insertion.");
35 35
     }
36 36
 
37 37
     /**
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      */
42 42
     static public function scheduleInsertTwice($entity)
43 43
     {
44
-        return new self("Entity " . self::objToStr($entity) . " can not be scheduled for insertion twice.");
44
+        return new self("Entity ".self::objToStr($entity)." can not be scheduled for insertion twice.");
45 45
     }
46 46
 
47 47
     /**
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     static public function entityWithoutIdentity($className, $entity)
54 54
     {
55 55
         return new self(
56
-            "The given entity of type '" . $className . "' (".self::objToStr($entity).") has no identity/no " .
56
+            "The given entity of type '".$className."' (".self::objToStr($entity).") has no identity/no ".
57 57
             "id values set. It cannot be added to the identity map."
58 58
         );
59 59
     }
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      */
66 66
     static public function readOnlyRequiresManagedEntity($entity)
67 67
     {
68
-        return new self("Only managed entities can be marked or checked as read only. But " . self::objToStr($entity) . " is not");
68
+        return new self("Only managed entities can be marked or checked as read only. But ".self::objToStr($entity)." is not");
69 69
     }
70 70
 
71 71
     /**
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
      */
122 122
     static public function entityNotManaged($entity)
123 123
     {
124
-        return new self("Entity " . self::objToStr($entity) . " is not managed. An entity is managed if its fetched " .
124
+        return new self("Entity ".self::objToStr($entity)." is not managed. An entity is managed if its fetched ".
125 125
             "from the database or registered as new through EntityManager#persist");
126 126
     }
127 127
 
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
      */
134 134
     static public function entityHasNoIdentity($entity, $operation)
135 135
     {
136
-        return new self("Entity has no identity, therefore " . $operation ." cannot be performed. " . self::objToStr($entity));
136
+        return new self("Entity has no identity, therefore ".$operation." cannot be performed. ".self::objToStr($entity));
137 137
     }
138 138
 
139 139
     /**
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
      */
145 145
     static public function entityIsRemoved($entity, $operation)
146 146
     {
147
-        return new self("Entity is removed, therefore " . $operation ." cannot be performed. " . self::objToStr($entity));
147
+        return new self("Entity is removed, therefore ".$operation." cannot be performed. ".self::objToStr($entity));
148 148
     }
149 149
 
150 150
     /**
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
      */
156 156
     static public function detachedEntityCannot($entity, $operation)
157 157
     {
158
-        return new self("Detached entity " . self::objToStr($entity) . " cannot be " . $operation);
158
+        return new self("Detached entity ".self::objToStr($entity)." cannot be ".$operation);
159 159
     }
160 160
 
161 161
     /**
@@ -167,8 +167,8 @@  discard block
 block discarded – undo
167 167
      */
168 168
     public static function invalidObject($context, $given, $parameterIndex = 1)
169 169
     {
170
-        return new self($context . ' expects parameter ' . $parameterIndex .
171
-            ' to be an entity object, '. gettype($given) . ' given.');
170
+        return new self($context.' expects parameter '.$parameterIndex.
171
+            ' to be an entity object, '.gettype($given).' given.');
172 172
     }
173 173
 
174 174
     /**
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
      */
177 177
     public static function invalidCompositeIdentifier()
178 178
     {
179
-        return new self("Binding an entity with a composite primary key to a query is not supported. " .
179
+        return new self("Binding an entity with a composite primary key to a query is not supported. ".
180 180
             "You should split the parameter into the explicit fields and bind them separately.");
181 181
     }
182 182
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/AbstractQuery.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@  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
 
7 7
 use Doctrine\Common\Util\ClassUtils;
8 8
 use Doctrine\Common\Collections\Collection;
9
-use Doctrine\Common\Collections\ArrayCollection;;
9
+use Doctrine\Common\Collections\ArrayCollection; ;
10 10
 use Doctrine\ORM\Query\Parameter;
11 11
 use Doctrine\ORM\Cache\QueryCacheKey;
12 12
 use Doctrine\DBAL\Cache\QueryCacheProfile;
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
     public function getParameter($key)
306 306
     {
307 307
         $filteredParameters = $this->parameters->filter(
308
-            function ($parameter) use ($key)
308
+            function($parameter) use ($key)
309 309
             {
310 310
                 // Must not be identical because of string to integer conversion
311 311
                 return ($key == $parameter->getName());
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
     public function setParameter($key, $value, $type = null)
355 355
     {
356 356
         $filteredParameters = $this->parameters->filter(
357
-            function ($parameter) use ($key)
357
+            function($parameter) use ($key)
358 358
             {
359 359
                 // Must not be identical because of string to integer conversion
360 360
                 return ($key == $parameter->getName());
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
      */
451 451
     private function translateNamespaces(Query\ResultSetMapping $rsm)
452 452
     {
453
-        $translate = function ($alias) {
453
+        $translate = function($alias) {
454 454
             return $this->em->getClassMetadata($alias)->getClassName();
455 455
         };
456 456
 
@@ -512,7 +512,7 @@  discard block
 block discarded – undo
512 512
      */
513 513
     public function setResultCacheProfile(QueryCacheProfile $profile = null)
514 514
     {
515
-        if (! $profile->getResultCacheDriver()) {
515
+        if ( ! $profile->getResultCacheDriver()) {
516 516
             $resultCacheDriver = $this->em->getConfiguration()->getResultCacheImpl();
517 517
             $profile = $profile->setResultCacheDriver($resultCacheDriver);
518 518
         }
@@ -980,7 +980,7 @@  discard block
 block discarded – undo
980 980
             $this->getTimestampKey()
981 981
         );
982 982
 
983
-        $result     = $queryCache->get($queryKey, $rsm, $this->hints);
983
+        $result = $queryCache->get($queryKey, $rsm, $this->hints);
984 984
 
985 985
         if ($result !== null) {
986 986
             if ($this->cacheLogger) {
@@ -1114,6 +1114,6 @@  discard block
 block discarded – undo
1114 1114
 
1115 1115
         ksort($hints);
1116 1116
 
1117
-        return sha1($query . '-' . serialize($params) . '-' . serialize($hints));
1117
+        return sha1($query.'-'.serialize($params).'-'.serialize($hints));
1118 1118
     }
1119 1119
 }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/EntityManagerAware.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 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
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/UnitOfWork.php 1 patch
Spacing   +42 added lines, -42 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
 
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
         $oid  = spl_object_hash($entity);
451 451
         $data = [];
452 452
 
453
-        if (!isset($this->entityChangeSets[$oid])) {
453
+        if ( ! isset($this->entityChangeSets[$oid])) {
454 454
             return $data;
455 455
         }
456 456
 
@@ -533,7 +533,7 @@  discard block
 block discarded – undo
533 533
                     || ! $class->getProperty($name) instanceof FieldMetadata
534 534
                     || ! $class->getProperty($name)->hasValueGenerator()
535 535
                     || $class->getProperty($name)->getValueGenerator()->getType() !== GeneratorType::IDENTITY
536
-                ) && (! $class->isVersioned() || $name !== $class->versionProperty->getName())) {
536
+                ) && ( ! $class->isVersioned() || $name !== $class->versionProperty->getName())) {
537 537
                 $actualData[$name] = $value;
538 538
             }
539 539
         }
@@ -587,7 +587,7 @@  discard block
 block discarded – undo
587 587
                     if ($owner === null) { // cloned
588 588
                         $actualValue->setOwner($entity, $property);
589 589
                     } else if ($owner !== $entity) { // no clone, we have to fix
590
-                        if (! $actualValue->isInitialized()) {
590
+                        if ( ! $actualValue->isInitialized()) {
591 591
                             $actualValue->initialize(); // we have to do this otherwise the cols share state
592 592
                         }
593 593
 
@@ -627,7 +627,7 @@  discard block
 block discarded – undo
627 627
                             // A PersistentCollection was de-referenced, so delete it.
628 628
                             $coid = spl_object_hash($orgValue);
629 629
 
630
-                            if (!isset($this->collectionDeletions[$coid])) {
630
+                            if ( ! isset($this->collectionDeletions[$coid])) {
631 631
                                 $this->collectionDeletions[$coid] = $orgValue;
632 632
                                 $changeSet[$propName] = $orgValue; // Signal changeset, to-many associations will be ignored
633 633
                             }
@@ -649,7 +649,7 @@  discard block
 block discarded – undo
649 649
 
650 650
         // Look for changes in associations of the entity
651 651
         foreach ($class->getProperties() as $property) {
652
-            if (! ($property instanceof AssociationMetadata) || ($value = $property->getValue($entity)) === null) {
652
+            if ( ! ($property instanceof AssociationMetadata) || ($value = $property->getValue($entity)) === null) {
653 653
                 continue;
654 654
             }
655 655
 
@@ -753,13 +753,13 @@  discard block
 block discarded – undo
753 753
         $targetClass    = $this->em->getClassMetadata($targetEntity);
754 754
 
755 755
         foreach ($unwrappedValue as $key => $entry) {
756
-            if (! ($entry instanceof $targetEntity)) {
756
+            if ( ! ($entry instanceof $targetEntity)) {
757 757
                 throw ORMInvalidArgumentException::invalidAssociation($targetClass, $association, $entry);
758 758
             }
759 759
 
760 760
             $state = $this->getEntityState($entry, self::STATE_NEW);
761 761
 
762
-            if (! ($entry instanceof $targetEntity)) {
762
+            if ( ! ($entry instanceof $targetEntity)) {
763 763
                 throw ORMException::unexpectedAssociationValue(
764 764
                     $association->getSourceEntity(),
765 765
                     $association->getName(),
@@ -818,7 +818,7 @@  discard block
 block discarded – undo
818 818
         $persister = $this->getEntityPersister($class->getClassName());
819 819
         $generationPlan->executeImmediate($this->em, $entity);
820 820
 
821
-        if (! $generationPlan->containsDeferred()) {
821
+        if ( ! $generationPlan->containsDeferred()) {
822 822
             $id = $this->em->getIdentifierFlattener()->flattenIdentifier($class, $persister->getIdentifier($entity));
823 823
             $this->entityIdentifiers[$oid] = $id;
824 824
         }
@@ -872,7 +872,7 @@  discard block
 block discarded – undo
872 872
                     break;
873 873
 
874 874
                 case ($property instanceof FieldMetadata):
875
-                    if (! $property->isPrimaryKey()
875
+                    if ( ! $property->isPrimaryKey()
876 876
                         || ! $property->getValueGenerator()
877 877
                         || $property->getValueGenerator()->getType() !== GeneratorType::IDENTITY) {
878 878
                         $actualData[$name] = $property->getValue($entity);
@@ -1025,7 +1025,7 @@  discard block
 block discarded – undo
1025 1025
             // Entity with this $oid after deletion treated as NEW, even if the $oid
1026 1026
             // is obtained by a new entity because the old one went out of scope.
1027 1027
             //$this->entityStates[$oid] = self::STATE_NEW;
1028
-            if (! $class->isIdentifierComposite()) {
1028
+            if ( ! $class->isIdentifierComposite()) {
1029 1029
                 $property = $class->getProperty($class->getSingleIdentifierFieldName());
1030 1030
 
1031 1031
                 if ($property instanceof FieldMetadata && $property->hasValueGenerator()) {
@@ -1078,7 +1078,7 @@  discard block
 block discarded – undo
1078 1078
         // Calculate dependencies for new nodes
1079 1079
         while ($class = array_pop($newNodes)) {
1080 1080
             foreach ($class->getProperties() as $property) {
1081
-                if (! ($property instanceof ToOneAssociationMetadata && $property->isOwningSide())) {
1081
+                if ( ! ($property instanceof ToOneAssociationMetadata && $property->isOwningSide())) {
1082 1082
                     continue;
1083 1083
                 }
1084 1084
 
@@ -1093,7 +1093,7 @@  discard block
 block discarded – undo
1093 1093
                 $weight = count(
1094 1094
                     array_filter(
1095 1095
                         $property->getJoinColumns(),
1096
-                        function (JoinColumnMetadata $joinColumn) { return $joinColumn->isNullable(); }
1096
+                        function(JoinColumnMetadata $joinColumn) { return $joinColumn->isNullable(); }
1097 1097
                     )
1098 1098
                 ) === 0;
1099 1099
 
@@ -1388,7 +1388,7 @@  discard block
 block discarded – undo
1388 1388
         $persister = $this->getEntityPersister($class->getClassName());
1389 1389
         $id        = $persister->getIdentifier($entity);
1390 1390
 
1391
-        if (! $id) {
1391
+        if ( ! $id) {
1392 1392
             return self::STATE_NEW;
1393 1393
         }
1394 1394
 
@@ -1623,7 +1623,7 @@  discard block
 block discarded – undo
1623 1623
                 throw ORMInvalidArgumentException::detachedEntityCannot($entity, "persisted");
1624 1624
 
1625 1625
             default:
1626
-                throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity));
1626
+                throw new UnexpectedValueException("Unexpected entity state: $entityState.".self::objToStr($entity));
1627 1627
         }
1628 1628
 
1629 1629
         $this->cascadePersist($entity, $visited);
@@ -1693,7 +1693,7 @@  discard block
 block discarded – undo
1693 1693
             case self::STATE_DETACHED:
1694 1694
                 throw ORMInvalidArgumentException::detachedEntityCannot($entity, "removed");
1695 1695
             default:
1696
-                throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity));
1696
+                throw new UnexpectedValueException("Unexpected entity state: $entityState.".self::objToStr($entity));
1697 1697
         }
1698 1698
 
1699 1699
     }
@@ -1782,7 +1782,7 @@  discard block
 block discarded – undo
1782 1782
                 if ($managedCopy === null) {
1783 1783
                     // If the identifier is ASSIGNED, it is NEW, otherwise an error
1784 1784
                     // since the managed entity was not found.
1785
-                    if (! $class->isIdentifierComposite()
1785
+                    if ( ! $class->isIdentifierComposite()
1786 1786
                         && $class->getProperty($class->getSingleIdentifierFieldName()) instanceof FieldMetadata
1787 1787
                         && $class->getProperty($class->getSingleIdentifierFieldName())->hasValueGenerator()) {
1788 1788
                         throw EntityNotFoundException::fromClassNameAndIdentifier(
@@ -1833,7 +1833,7 @@  discard block
 block discarded – undo
1833 1833
      */
1834 1834
     private function ensureVersionMatch(ClassMetadata $class, $entity, $managedCopy)
1835 1835
     {
1836
-        if (! ($class->isVersioned() && $this->isLoaded($managedCopy) && $this->isLoaded($entity))) {
1836
+        if ( ! ($class->isVersioned() && $this->isLoaded($managedCopy) && $this->isLoaded($entity))) {
1837 1837
             return;
1838 1838
         }
1839 1839
 
@@ -1857,7 +1857,7 @@  discard block
 block discarded – undo
1857 1857
      */
1858 1858
     private function isLoaded($entity)
1859 1859
     {
1860
-        return !($entity instanceof Proxy) || $entity->__isInitialized();
1860
+        return ! ($entity instanceof Proxy) || $entity->__isInitialized();
1861 1861
     }
1862 1862
 
1863 1863
     /**
@@ -2019,7 +2019,7 @@  discard block
 block discarded – undo
2019 2019
         $class        = $this->em->getClassMetadata(get_class($entity));
2020 2020
         $associations = array_filter(
2021 2021
             $class->getProperties(),
2022
-            function (Property $property) {
2022
+            function(Property $property) {
2023 2023
                 return $property instanceof AssociationMetadata && in_array('refresh', $property->getCascade());
2024 2024
             }
2025 2025
         );
@@ -2063,7 +2063,7 @@  discard block
 block discarded – undo
2063 2063
         $class        = $this->em->getClassMetadata(get_class($entity));
2064 2064
         $associations = array_filter(
2065 2065
             $class->getProperties(),
2066
-            function (Property $property) {
2066
+            function(Property $property) {
2067 2067
                 return $property instanceof AssociationMetadata && in_array('detach', $property->getCascade());
2068 2068
             }
2069 2069
         );
@@ -2108,7 +2108,7 @@  discard block
 block discarded – undo
2108 2108
         $class        = $this->em->getClassMetadata(get_class($entity));
2109 2109
         $associations = array_filter(
2110 2110
             $class->getProperties(),
2111
-            function (Property $property) {
2111
+            function(Property $property) {
2112 2112
                 return $property instanceof AssociationMetadata && in_array('merge', $property->getCascade());
2113 2113
             }
2114 2114
         );
@@ -2149,7 +2149,7 @@  discard block
 block discarded – undo
2149 2149
         $class        = $this->em->getClassMetadata(get_class($entity));
2150 2150
         $associations = array_filter(
2151 2151
             $class->getProperties(),
2152
-            function (Property $property) {
2152
+            function(Property $property) {
2153 2153
                 return $property instanceof AssociationMetadata && in_array('persist', $property->getCascade());
2154 2154
             }
2155 2155
         );
@@ -2167,7 +2167,7 @@  discard block
 block discarded – undo
2167 2167
 
2168 2168
                 case ($relatedEntities instanceof Collection):
2169 2169
                 case (is_array($relatedEntities)):
2170
-                    if (! ($association instanceof ToManyAssociationMetadata)) {
2170
+                    if ( ! ($association instanceof ToManyAssociationMetadata)) {
2171 2171
                         throw ORMInvalidArgumentException::invalidAssociation(
2172 2172
                             $this->em->getClassMetadata($targetEntity),
2173 2173
                             $association,
@@ -2182,7 +2182,7 @@  discard block
 block discarded – undo
2182 2182
                     break;
2183 2183
 
2184 2184
                 case ($relatedEntities !== null):
2185
-                    if (! $relatedEntities instanceof $targetEntity) {
2185
+                    if ( ! $relatedEntities instanceof $targetEntity) {
2186 2186
                         throw ORMInvalidArgumentException::invalidAssociation(
2187 2187
                             $this->em->getClassMetadata($targetEntity),
2188 2188
                             $association,
@@ -2213,7 +2213,7 @@  discard block
 block discarded – undo
2213 2213
         $class             = $this->em->getClassMetadata(get_class($entity));
2214 2214
         $associations      = array_filter(
2215 2215
             $class->getProperties(),
2216
-            function (Property $property) {
2216
+            function(Property $property) {
2217 2217
                 return $property instanceof AssociationMetadata && in_array('remove', $property->getCascade());
2218 2218
             }
2219 2219
         );
@@ -2298,7 +2298,7 @@  discard block
 block discarded – undo
2298 2298
             case LockMode::NONE === $lockMode:
2299 2299
             case LockMode::PESSIMISTIC_READ === $lockMode:
2300 2300
             case LockMode::PESSIMISTIC_WRITE === $lockMode:
2301
-                if (!$this->em->getConnection()->isTransactionActive()) {
2301
+                if ( ! $this->em->getConnection()->isTransactionActive()) {
2302 2302
                     throw TransactionRequiredException::transactionRequired();
2303 2303
                 }
2304 2304
 
@@ -2542,7 +2542,7 @@  discard block
 block discarded – undo
2542 2542
         }
2543 2543
 
2544 2544
         foreach ($class->getProperties() as $field => $association) {
2545
-            if (! ($association instanceof AssociationMetadata)) {
2545
+            if ( ! ($association instanceof AssociationMetadata)) {
2546 2546
                 continue;
2547 2547
             }
2548 2548
 
@@ -2591,7 +2591,7 @@  discard block
 block discarded – undo
2591 2591
                 continue;
2592 2592
             }
2593 2593
 
2594
-            if (! $association->isOwningSide()) {
2594
+            if ( ! $association->isOwningSide()) {
2595 2595
                 // use the given entity association
2596 2596
                 if (isset($data[$field]) && is_object($data[$field]) &&
2597 2597
                     isset($this->entityStates[spl_object_hash($data[$field])])) {
@@ -2640,7 +2640,7 @@  discard block
 block discarded – undo
2640 2640
                 $associatedId[$targetField] = $joinColumnValue;
2641 2641
             }
2642 2642
 
2643
-            if (!$associatedId) {
2643
+            if ( ! $associatedId) {
2644 2644
                 // Foreign key is NULL
2645 2645
                 $association->setValue($entity, null);
2646 2646
                 $this->originalEntityData[$oid][$field] = null;
@@ -2649,7 +2649,7 @@  discard block
 block discarded – undo
2649 2649
             }
2650 2650
 
2651 2651
             // @todo guilhermeblanco Can we remove the need of this somehow?
2652
-            if (!isset($hints['fetchMode'][$class->getClassName()][$field])) {
2652
+            if ( ! isset($hints['fetchMode'][$class->getClassName()][$field])) {
2653 2653
                 $hints['fetchMode'][$class->getClassName()][$field] = $association->getFetchMode();
2654 2654
             }
2655 2655
 
@@ -2666,7 +2666,7 @@  discard block
 block discarded – undo
2666 2666
                     // If this is an uninitialized proxy, we are deferring eager loads,
2667 2667
                     // this association is marked as eager fetch, and its an uninitialized proxy (wtf!)
2668 2668
                     // then we can append this entity for eager loading!
2669
-                    if (!$targetClass->isIdentifierComposite() &&
2669
+                    if ( ! $targetClass->isIdentifierComposite() &&
2670 2670
                         $newValue instanceof Proxy &&
2671 2671
                         isset($hints[self::HINT_DEFEREAGERLOAD]) &&
2672 2672
                         $hints['fetchMode'][$class->getClassName()][$field] === FetchMode::EAGER &&
@@ -2697,7 +2697,7 @@  discard block
 block discarded – undo
2697 2697
                             break;
2698 2698
 
2699 2699
                         // Deferred eager load only works for single identifier classes
2700
-                        case (isset($hints[self::HINT_DEFEREAGERLOAD]) && !$targetClass->isIdentifierComposite()):
2700
+                        case (isset($hints[self::HINT_DEFEREAGERLOAD]) && ! $targetClass->isIdentifierComposite()):
2701 2701
                             // TODO: Is there a faster approach?
2702 2702
                             $this->eagerLoadingEntities[$targetClass->getRootClassName()][$relatedIdHash] = current($associatedId);
2703 2703
 
@@ -3069,7 +3069,7 @@  discard block
 block discarded – undo
3069 3069
     {
3070 3070
         $class = $this->em->getClassMetadata(get_class($entity));
3071 3071
 
3072
-        if (! $class->getProperty($propertyName)) {
3072
+        if ( ! $class->getProperty($propertyName)) {
3073 3073
             return; // ignore non-persistent fields
3074 3074
         }
3075 3075
 
@@ -3209,7 +3209,7 @@  discard block
 block discarded – undo
3209 3209
      */
3210 3210
     private function afterTransactionComplete()
3211 3211
     {
3212
-        $this->performCallbackOnCachedPersister(function (CachedPersister $persister) {
3212
+        $this->performCallbackOnCachedPersister(function(CachedPersister $persister) {
3213 3213
             $persister->afterTransactionComplete();
3214 3214
         });
3215 3215
     }
@@ -3219,7 +3219,7 @@  discard block
 block discarded – undo
3219 3219
      */
3220 3220
     private function afterTransactionRolledBack()
3221 3221
     {
3222
-        $this->performCallbackOnCachedPersister(function (CachedPersister $persister) {
3222
+        $this->performCallbackOnCachedPersister(function(CachedPersister $persister) {
3223 3223
             $persister->afterTransactionRolledBack();
3224 3224
         });
3225 3225
     }
@@ -3302,11 +3302,11 @@  discard block
 block discarded – undo
3302 3302
      */
3303 3303
     private function mergeEntityStateIntoManagedCopy($entity, $managedCopy)
3304 3304
     {
3305
-        if (! $this->isLoaded($entity)) {
3305
+        if ( ! $this->isLoaded($entity)) {
3306 3306
             return;
3307 3307
         }
3308 3308
 
3309
-        if (! $this->isLoaded($managedCopy)) {
3309
+        if ( ! $this->isLoaded($managedCopy)) {
3310 3310
             $managedCopy->__load();
3311 3311
         }
3312 3312
 
@@ -3315,7 +3315,7 @@  discard block
 block discarded – undo
3315 3315
         foreach ($class->getProperties() as $property) {
3316 3316
             switch (true) {
3317 3317
                 case ($property instanceof FieldMetadata):
3318
-                    if (! $property->isPrimaryKey()) {
3318
+                    if ( ! $property->isPrimaryKey()) {
3319 3319
                         $property->setValue($managedCopy, $property->getValue($entity));
3320 3320
                     }
3321 3321
 
@@ -3337,7 +3337,7 @@  discard block
 block discarded – undo
3337 3337
                         continue 2;
3338 3338
                     }
3339 3339
 
3340
-                    if (! in_array('merge', $property->getCascade())) {
3340
+                    if ( ! in_array('merge', $property->getCascade())) {
3341 3341
                         if ($this->getEntityState($other) === self::STATE_DETACHED) {
3342 3342
                             $targetEntity    = $property->getTargetEntity();
3343 3343
                             $targetClass     = $this->em->getClassMetadata($targetEntity);
@@ -3369,7 +3369,7 @@  discard block
 block discarded – undo
3369 3369
 
3370 3370
                     $managedCol = $property->getValue($managedCopy);
3371 3371
 
3372
-                    if (! $managedCol) {
3372
+                    if ( ! $managedCol) {
3373 3373
                         $managedCol = $property->wrap($managedCopy, [], $this->em);
3374 3374
 
3375 3375
                         $property->setValue($managedCopy, $managedCol);
@@ -3379,7 +3379,7 @@  discard block
 block discarded – undo
3379 3379
                         $managedCol->initialize();
3380 3380
 
3381 3381
                         // clear and set dirty a managed collection if its not also the same collection to merge from.
3382
-                        if (! $managedCol->isEmpty() && $managedCol !== $mergeCol) {
3382
+                        if ( ! $managedCol->isEmpty() && $managedCol !== $mergeCol) {
3383 3383
                             $managedCol->unwrap()->clear();
3384 3384
                             $managedCol->setDirty(true);
3385 3385
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/LazyCriteriaCollection.php 1 patch
Spacing   +2 added lines, -2 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
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
             return $this->collection->isEmpty();
79 79
         }
80 80
 
81
-        return !$this->count();
81
+        return ! $this->count();
82 82
     }
83 83
 
84 84
     /**
Please login to merge, or discard this patch.
lib/Doctrine/ORM/NoResultException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 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
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Annotation/GeneratedValue.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 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\Annotation;
6 6
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Annotation/AttributeOverrides.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 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\Annotation;
6 6
 
Please login to merge, or discard this patch.