Completed
Push — master ( 984641...035d9e )
by Marco
36:13 queued 25:30
created
lib/Doctrine/ORM/Configuration.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
      */
161 161
     public function newDefaultAnnotationDriver(array $paths = []) : AnnotationDriver
162 162
     {
163
-        AnnotationRegistry::registerFile(__DIR__ . '/Annotation/DoctrineAnnotations.php');
163
+        AnnotationRegistry::registerFile(__DIR__.'/Annotation/DoctrineAnnotations.php');
164 164
 
165 165
         $reader = new CachedReader(new AnnotationReader(), new ArrayCache());
166 166
 
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
     {
235 235
         $queryCacheImpl = $this->getQueryCacheImpl();
236 236
 
237
-        if (! $queryCacheImpl) {
237
+        if ( ! $queryCacheImpl) {
238 238
             throw QueryCacheNotConfigured::create();
239 239
         }
240 240
 
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
 
245 245
         $metadataCacheImpl = $this->getMetadataCacheImpl();
246 246
 
247
-        if (! $metadataCacheImpl) {
247
+        if ( ! $metadataCacheImpl) {
248 248
             throw MetadataCacheNotConfigured::create();
249 249
         }
250 250
 
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
     {
453 453
         $reflectionClass = new \ReflectionClass($repositoryClassName);
454 454
 
455
-        if (! $reflectionClass->implementsInterface(ObjectRepository::class)) {
455
+        if ( ! $reflectionClass->implementsInterface(ObjectRepository::class)) {
456 456
             throw InvalidEntityRepository::fromClassName($repositoryClassName);
457 457
         }
458 458
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Exception/InvalidEntityRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
     public static function fromClassName(string $className) : self
12 12
     {
13 13
         return new self(
14
-            "Invalid repository class '" . $className . "'. It must be a " . ObjectRepository::class . '.'
14
+            "Invalid repository class '".$className."'. It must be a ".ObjectRepository::class.'.'
15 15
         );
16 16
     }
17 17
 }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Exception/MissingMappingDriverImplementation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
     public static function create() : self
10 10
     {
11 11
         return new self(
12
-            "It's a requirement to specify a Metadata Driver and pass it " .
12
+            "It's a requirement to specify a Metadata Driver and pass it ".
13 13
             'to Doctrine\\ORM\\Configuration::setMetadataDriverImpl().'
14 14
         );
15 15
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/UnitOfWork.php 1 patch
Spacing   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
 
337 337
         $this->computeChangeSets();
338 338
 
339
-        if (! ($this->entityInsertions ||
339
+        if ( ! ($this->entityInsertions ||
340 340
                 $this->entityDeletions ||
341 341
                 $this->entityUpdates ||
342 342
                 $this->collectionUpdates ||
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
             // Entity deletions come last and need to be in reverse commit order
396 396
             if ($this->entityDeletions) {
397 397
                 foreach (array_reverse($commitOrder) as $committedEntityName) {
398
-                    if (! $this->entityDeletions) {
398
+                    if ( ! $this->entityDeletions) {
399 399
                         break; // just a performance optimisation
400 400
                     }
401 401
 
@@ -478,7 +478,7 @@  discard block
 block discarded – undo
478 478
         $oid  = spl_object_id($entity);
479 479
         $data = [];
480 480
 
481
-        if (! isset($this->entityChangeSets[$oid])) {
481
+        if ( ! isset($this->entityChangeSets[$oid])) {
482 482
             return $data;
483 483
         }
484 484
 
@@ -559,12 +559,12 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
999 999
                 $this->recomputeSingleEntityChangeSet($class, $entity);
1000 1000
             }
1001 1001
 
1002
-            if (! empty($this->entityChangeSets[$oid])) {
1002
+            if ( ! empty($this->entityChangeSets[$oid])) {
1003 1003
 //                echo 'Update: ';
1004 1004
 //                \Doctrine\Common\Util\Debug::dump($this->entityChangeSets[$oid], 3);
1005 1005
 
@@ -1042,7 +1042,7 @@  discard block
 block discarded – undo
1042 1042
             // Entity with this $oid after deletion treated as NEW, even if the $oid
1043 1043
             // is obtained by a new entity because the old one went out of scope.
1044 1044
             //$this->entityStates[$oid] = self::STATE_NEW;
1045
-            if (! $class->isIdentifierComposite()) {
1045
+            if ( ! $class->isIdentifierComposite()) {
1046 1046
                 $property = $class->getProperty($class->getSingleIdentifierFieldName());
1047 1047
 
1048 1048
                 if ($property instanceof FieldMetadata && $property->hasValueGenerator()) {
@@ -1089,13 +1089,13 @@  discard block
 block discarded – undo
1089 1089
         // Calculate dependencies for new nodes
1090 1090
         while ($class = array_pop($newNodes)) {
1091 1091
             foreach ($class->getDeclaredPropertiesIterator() as $property) {
1092
-                if (! ($property instanceof ToOneAssociationMetadata && $property->isOwningSide())) {
1092
+                if ( ! ($property instanceof ToOneAssociationMetadata && $property->isOwningSide())) {
1093 1093
                     continue;
1094 1094
                 }
1095 1095
 
1096 1096
                 $targetClass = $this->em->getClassMetadata($property->getTargetEntity());
1097 1097
 
1098
-                if (! $calc->hasNode($targetClass->getClassName())) {
1098
+                if ( ! $calc->hasNode($targetClass->getClassName())) {
1099 1099
                     $calc->addNode($targetClass->getClassName(), $targetClass);
1100 1100
 
1101 1101
                     $newNodes[] = $targetClass;
@@ -1103,7 +1103,7 @@  discard block
 block discarded – undo
1103 1103
 
1104 1104
                 $weight = ! array_filter(
1105 1105
                     $property->getJoinColumns(),
1106
-                    function (JoinColumnMetadata $joinColumn) {
1106
+                    function(JoinColumnMetadata $joinColumn) {
1107 1107
                         return $joinColumn->isNullable();
1108 1108
                     }
1109 1109
                 );
@@ -1111,14 +1111,14 @@  discard block
 block discarded – undo
1111 1111
                 $calc->addDependency($targetClass->getClassName(), $class->getClassName(), $weight);
1112 1112
 
1113 1113
                 // If the target class has mapped subclasses, these share the same dependency.
1114
-                if (! $targetClass->getSubClasses()) {
1114
+                if ( ! $targetClass->getSubClasses()) {
1115 1115
                     continue;
1116 1116
                 }
1117 1117
 
1118 1118
                 foreach ($targetClass->getSubClasses() as $subClassName) {
1119 1119
                     $targetSubClass = $this->em->getClassMetadata($subClassName);
1120 1120
 
1121
-                    if (! $calc->hasNode($subClassName)) {
1121
+                    if ( ! $calc->hasNode($subClassName)) {
1122 1122
                         $calc->addNode($targetSubClass->getClassName(), $targetSubClass);
1123 1123
 
1124 1124
                         $newNodes[] = $targetSubClass;
@@ -1194,7 +1194,7 @@  discard block
 block discarded – undo
1194 1194
     {
1195 1195
         $oid = spl_object_id($entity);
1196 1196
 
1197
-        if (! isset($this->entityIdentifiers[$oid])) {
1197
+        if ( ! isset($this->entityIdentifiers[$oid])) {
1198 1198
             throw ORMInvalidArgumentException::entityHasNoIdentity($entity, 'scheduling for update');
1199 1199
         }
1200 1200
 
@@ -1202,7 +1202,7 @@  discard block
 block discarded – undo
1202 1202
             throw ORMInvalidArgumentException::entityIsRemoved($entity, 'schedule for update');
1203 1203
         }
1204 1204
 
1205
-        if (! isset($this->entityUpdates[$oid]) && ! isset($this->entityInsertions[$oid])) {
1205
+        if ( ! isset($this->entityUpdates[$oid]) && ! isset($this->entityInsertions[$oid])) {
1206 1206
             $this->entityUpdates[$oid] = $entity;
1207 1207
         }
1208 1208
     }
@@ -1278,7 +1278,7 @@  discard block
 block discarded – undo
1278 1278
             return; // entity has not been persisted yet, so nothing more to do.
1279 1279
         }
1280 1280
 
1281
-        if (! $this->isInIdentityMap($entity)) {
1281
+        if ( ! $this->isInIdentityMap($entity)) {
1282 1282
             return;
1283 1283
         }
1284 1284
 
@@ -1286,7 +1286,7 @@  discard block
 block discarded – undo
1286 1286
 
1287 1287
         unset($this->entityUpdates[$oid]);
1288 1288
 
1289
-        if (! isset($this->entityDeletions[$oid])) {
1289
+        if ( ! isset($this->entityDeletions[$oid])) {
1290 1290
             $this->entityDeletions[$oid] = $entity;
1291 1291
             $this->entityStates[$oid]    = self::STATE_REMOVED;
1292 1292
         }
@@ -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
 
@@ -1748,7 +1748,7 @@  discard block
 block discarded – undo
1748 1748
         $class = $this->em->getClassMetadata(get_class($entity));
1749 1749
 
1750 1750
         foreach ($class->getDeclaredPropertiesIterator() as $association) {
1751
-            if (! ($association instanceof AssociationMetadata && in_array('refresh', $association->getCascade(), true))) {
1751
+            if ( ! ($association instanceof AssociationMetadata && in_array('refresh', $association->getCascade(), true))) {
1752 1752
                 continue;
1753 1753
             }
1754 1754
 
@@ -1795,7 +1795,7 @@  discard block
 block discarded – undo
1795 1795
         }
1796 1796
 
1797 1797
         foreach ($class->getDeclaredPropertiesIterator() as $association) {
1798
-            if (! ($association instanceof AssociationMetadata && in_array('persist', $association->getCascade(), true))) {
1798
+            if ( ! ($association instanceof AssociationMetadata && in_array('persist', $association->getCascade(), true))) {
1799 1799
                 continue;
1800 1800
             }
1801 1801
 
@@ -1811,7 +1811,7 @@  discard block
 block discarded – undo
1811 1811
 
1812 1812
                 case ($relatedEntities instanceof Collection):
1813 1813
                 case (is_array($relatedEntities)):
1814
-                    if (! ($association instanceof ToManyAssociationMetadata)) {
1814
+                    if ( ! ($association instanceof ToManyAssociationMetadata)) {
1815 1815
                         throw ORMInvalidArgumentException::invalidAssociation(
1816 1816
                             $this->em->getClassMetadata($targetEntity),
1817 1817
                             $association,
@@ -1826,7 +1826,7 @@  discard block
 block discarded – undo
1826 1826
                     break;
1827 1827
 
1828 1828
                 case ($relatedEntities !== null):
1829
-                    if (! $relatedEntities instanceof $targetEntity) {
1829
+                    if ( ! $relatedEntities instanceof $targetEntity) {
1830 1830
                         throw ORMInvalidArgumentException::invalidAssociation(
1831 1831
                             $this->em->getClassMetadata($targetEntity),
1832 1832
                             $association,
@@ -1855,7 +1855,7 @@  discard block
 block discarded – undo
1855 1855
         $class             = $this->em->getClassMetadata(get_class($entity));
1856 1856
 
1857 1857
         foreach ($class->getDeclaredPropertiesIterator() as $association) {
1858
-            if (! ($association instanceof AssociationMetadata && in_array('remove', $association->getCascade(), true))) {
1858
+            if ( ! ($association instanceof AssociationMetadata && in_array('remove', $association->getCascade(), true))) {
1859 1859
                 continue;
1860 1860
             }
1861 1861
 
@@ -1914,7 +1914,7 @@  discard block
 block discarded – undo
1914 1914
 
1915 1915
         switch (true) {
1916 1916
             case $lockMode === LockMode::OPTIMISTIC:
1917
-                if (! $class->isVersioned()) {
1917
+                if ( ! $class->isVersioned()) {
1918 1918
                     throw OptimisticLockException::notVersioned($class->getClassName());
1919 1919
                 }
1920 1920
 
@@ -1937,7 +1937,7 @@  discard block
 block discarded – undo
1937 1937
             case $lockMode === LockMode::NONE:
1938 1938
             case $lockMode === LockMode::PESSIMISTIC_READ:
1939 1939
             case $lockMode === LockMode::PESSIMISTIC_WRITE:
1940
-                if (! $this->em->getConnection()->isTransactionActive()) {
1940
+                if ( ! $this->em->getConnection()->isTransactionActive()) {
1941 1941
                     throw TransactionRequiredException::transactionRequired();
1942 1942
                 }
1943 1943
 
@@ -2096,7 +2096,7 @@  discard block
 block discarded – undo
2096 2096
                     $entity->addPropertyChangedListener($this);
2097 2097
                 }
2098 2098
             } else {
2099
-                if (! isset($hints[Query::HINT_REFRESH])
2099
+                if ( ! isset($hints[Query::HINT_REFRESH])
2100 2100
                     || (isset($hints[Query::HINT_REFRESH_ENTITY]) && $hints[Query::HINT_REFRESH_ENTITY] !== $entity)) {
2101 2101
                     return $entity;
2102 2102
                 }
@@ -2144,7 +2144,7 @@  discard block
 block discarded – undo
2144 2144
         }
2145 2145
 
2146 2146
         foreach ($class->getDeclaredPropertiesIterator() as $field => $association) {
2147
-            if (! ($association instanceof AssociationMetadata)) {
2147
+            if ( ! ($association instanceof AssociationMetadata)) {
2148 2148
                 continue;
2149 2149
             }
2150 2150
 
@@ -2193,7 +2193,7 @@  discard block
 block discarded – undo
2193 2193
                 continue;
2194 2194
             }
2195 2195
 
2196
-            if (! $association->isOwningSide()) {
2196
+            if ( ! $association->isOwningSide()) {
2197 2197
                 // use the given entity association
2198 2198
                 if (isset($data[$field]) && is_object($data[$field]) &&
2199 2199
                     isset($this->entityStates[spl_object_id($data[$field])])) {
@@ -2243,7 +2243,7 @@  discard block
 block discarded – undo
2243 2243
                 $associatedId[$targetField] = $joinColumnValue;
2244 2244
             }
2245 2245
 
2246
-            if (! $associatedId) {
2246
+            if ( ! $associatedId) {
2247 2247
                 // Foreign key is NULL
2248 2248
                 $association->setValue($entity, null);
2249 2249
                 $this->originalEntityData[$oid][$field] = null;
@@ -2252,7 +2252,7 @@  discard block
 block discarded – undo
2252 2252
             }
2253 2253
 
2254 2254
             // @todo guilhermeblanco Can we remove the need of this somehow?
2255
-            if (! isset($hints['fetchMode'][$class->getClassName()][$field])) {
2255
+            if ( ! isset($hints['fetchMode'][$class->getClassName()][$field])) {
2256 2256
                 $hints['fetchMode'][$class->getClassName()][$field] = $association->getFetchMode();
2257 2257
             }
2258 2258
 
@@ -2269,7 +2269,7 @@  discard block
 block discarded – undo
2269 2269
                     // If this is an uninitialized proxy, we are deferring eager loads,
2270 2270
                     // this association is marked as eager fetch, and its an uninitialized proxy (wtf!)
2271 2271
                     // then we can append this entity for eager loading!
2272
-                    if (! $targetClass->isIdentifierComposite() &&
2272
+                    if ( ! $targetClass->isIdentifierComposite() &&
2273 2273
                         $newValue instanceof GhostObjectInterface &&
2274 2274
                         isset($hints[self::HINT_DEFEREAGERLOAD]) &&
2275 2275
                         $hints['fetchMode'][$class->getClassName()][$field] === FetchMode::EAGER &&
@@ -2352,7 +2352,7 @@  discard block
 block discarded – undo
2352 2352
 
2353 2353
     public function triggerEagerLoads()
2354 2354
     {
2355
-        if (! $this->eagerLoadingEntities) {
2355
+        if ( ! $this->eagerLoadingEntities) {
2356 2356
             return;
2357 2357
         }
2358 2358
 
@@ -2361,7 +2361,7 @@  discard block
 block discarded – undo
2361 2361
         $this->eagerLoadingEntities = [];
2362 2362
 
2363 2363
         foreach ($eagerLoadingEntities as $entityName => $ids) {
2364
-            if (! $ids) {
2364
+            if ( ! $ids) {
2365 2365
                 continue;
2366 2366
             }
2367 2367
 
@@ -2659,7 +2659,7 @@  discard block
 block discarded – undo
2659 2659
     {
2660 2660
         $class = $this->em->getClassMetadata(get_class($entity));
2661 2661
 
2662
-        if (! $class->getProperty($propertyName)) {
2662
+        if ( ! $class->getProperty($propertyName)) {
2663 2663
             return; // ignore non-persistent fields
2664 2664
         }
2665 2665
 
@@ -2668,7 +2668,7 @@  discard block
 block discarded – undo
2668 2668
         // Update changeset and mark entity for synchronization
2669 2669
         $this->entityChangeSets[$oid][$propertyName] = [$oldValue, $newValue];
2670 2670
 
2671
-        if (! isset($this->scheduledForSynchronization[$class->getRootClassName()][$oid])) {
2671
+        if ( ! isset($this->scheduledForSynchronization[$class->getRootClassName()][$oid])) {
2672 2672
             $this->scheduleForSynchronization($entity);
2673 2673
         }
2674 2674
     }
@@ -2750,7 +2750,7 @@  discard block
 block discarded – undo
2750 2750
      */
2751 2751
     private static function objToStr($obj)
2752 2752
     {
2753
-        return method_exists($obj, '__toString') ? (string) $obj : get_class($obj) . '@' . spl_object_id($obj);
2753
+        return method_exists($obj, '__toString') ? (string) $obj : get_class($obj).'@'.spl_object_id($obj);
2754 2754
     }
2755 2755
 
2756 2756
     /**
@@ -2765,7 +2765,7 @@  discard block
 block discarded – undo
2765 2765
      */
2766 2766
     public function markReadOnly($object)
2767 2767
     {
2768
-        if (! is_object($object) || ! $this->isInIdentityMap($object)) {
2768
+        if ( ! is_object($object) || ! $this->isInIdentityMap($object)) {
2769 2769
             throw ORMInvalidArgumentException::readOnlyRequiresManagedEntity($object);
2770 2770
         }
2771 2771
 
@@ -2783,7 +2783,7 @@  discard block
 block discarded – undo
2783 2783
      */
2784 2784
     public function isReadOnly($object)
2785 2785
     {
2786
-        if (! is_object($object)) {
2786
+        if ( ! is_object($object)) {
2787 2787
             throw ORMInvalidArgumentException::readOnlyRequiresManagedEntity($object);
2788 2788
         }
2789 2789
 
@@ -2795,7 +2795,7 @@  discard block
 block discarded – undo
2795 2795
      */
2796 2796
     private function afterTransactionComplete()
2797 2797
     {
2798
-        $this->performCallbackOnCachedPersister(function (CachedPersister $persister) {
2798
+        $this->performCallbackOnCachedPersister(function(CachedPersister $persister) {
2799 2799
             $persister->afterTransactionComplete();
2800 2800
         });
2801 2801
     }
@@ -2805,7 +2805,7 @@  discard block
 block discarded – undo
2805 2805
      */
2806 2806
     private function afterTransactionRolledBack()
2807 2807
     {
2808
-        $this->performCallbackOnCachedPersister(function (CachedPersister $persister) {
2808
+        $this->performCallbackOnCachedPersister(function(CachedPersister $persister) {
2809 2809
             $persister->afterTransactionRolledBack();
2810 2810
         });
2811 2811
     }
@@ -2815,7 +2815,7 @@  discard block
 block discarded – undo
2815 2815
      */
2816 2816
     private function performCallbackOnCachedPersister(callable $callback)
2817 2817
     {
2818
-        if (! $this->hasCache) {
2818
+        if ( ! $this->hasCache) {
2819 2819
             return;
2820 2820
         }
2821 2821
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
             return $this->classNames;
200 200
         }
201 201
 
202
-        if (! $this->paths) {
202
+        if ( ! $this->paths) {
203 203
             throw Mapping\MappingException::pathRequired();
204 204
         }
205 205
 
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
         $includedFiles = [];
208 208
 
209 209
         foreach ($this->paths as $path) {
210
-            if (! is_dir($path)) {
210
+            if ( ! is_dir($path)) {
211 211
                 throw Mapping\MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path);
212 212
             }
213 213
 
@@ -216,14 +216,14 @@  discard block
 block discarded – undo
216 216
                     new \RecursiveDirectoryIterator($path, \FilesystemIterator::SKIP_DOTS),
217 217
                     \RecursiveIteratorIterator::LEAVES_ONLY
218 218
                 ),
219
-                '/^.+' . preg_quote($this->fileExtension) . '$/i',
219
+                '/^.+'.preg_quote($this->fileExtension).'$/i',
220 220
                 \RecursiveRegexIterator::GET_MATCH
221 221
             );
222 222
 
223 223
             foreach ($iterator as $file) {
224 224
                 $sourceFile = $file[0];
225 225
 
226
-                if (! preg_match('(^phar:)i', $sourceFile)) {
226
+                if ( ! preg_match('(^phar:)i', $sourceFile)) {
227 227
                     $sourceFile = realpath($sourceFile);
228 228
                 }
229 229
 
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
     ) : Mapping\ClassMetadata {
273 273
         $reflectionClass = $metadata->getReflectionClass();
274 274
 
275
-        if (! $reflectionClass) {
275
+        if ( ! $reflectionClass) {
276 276
             // this happens when running annotation driver in combination with
277 277
             // static reflection services. This is not the nicest fix
278 278
             $reflectionClass = new \ReflectionClass($metadata->getClassName());
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
                 );
318 318
             }
319 319
 
320
-            if (! $property) {
320
+            if ( ! $property) {
321 321
                 continue;
322 322
             }
323 323
 
@@ -610,12 +610,12 @@  discard block
 block discarded – undo
610 610
         $assocMetadata->setOrphanRemoval($oneToOneAnnot->orphanRemoval);
611 611
         $assocMetadata->setFetchMode($this->getFetchMode($className, $oneToOneAnnot->fetch));
612 612
 
613
-        if (! empty($oneToOneAnnot->mappedBy)) {
613
+        if ( ! empty($oneToOneAnnot->mappedBy)) {
614 614
             $assocMetadata->setMappedBy($oneToOneAnnot->mappedBy);
615 615
             $assocMetadata->setOwningSide(false);
616 616
         }
617 617
 
618
-        if (! empty($oneToOneAnnot->inversedBy)) {
618
+        if ( ! empty($oneToOneAnnot->inversedBy)) {
619 619
             $assocMetadata->setInversedBy($oneToOneAnnot->inversedBy);
620 620
         }
621 621
 
@@ -672,7 +672,7 @@  discard block
 block discarded – undo
672 672
         $assocMetadata->setCascade($this->getCascade($className, $fieldName, $manyToOneAnnot->cascade));
673 673
         $assocMetadata->setFetchMode($this->getFetchMode($className, $manyToOneAnnot->fetch));
674 674
 
675
-        if (! empty($manyToOneAnnot->inversedBy)) {
675
+        if ( ! empty($manyToOneAnnot->inversedBy)) {
676 676
             $assocMetadata->setInversedBy($manyToOneAnnot->inversedBy);
677 677
         }
678 678
 
@@ -732,7 +732,7 @@  discard block
 block discarded – undo
732 732
         $assocMetadata->setOwningSide(false);
733 733
         $assocMetadata->setMappedBy($oneToManyAnnot->mappedBy);
734 734
 
735
-        if (! empty($oneToManyAnnot->indexBy)) {
735
+        if ( ! empty($oneToManyAnnot->indexBy)) {
736 736
             $assocMetadata->setIndexedBy($oneToManyAnnot->indexBy);
737 737
         }
738 738
 
@@ -774,16 +774,16 @@  discard block
 block discarded – undo
774 774
         $assocMetadata->setOrphanRemoval($manyToManyAnnot->orphanRemoval);
775 775
         $assocMetadata->setFetchMode($this->getFetchMode($className, $manyToManyAnnot->fetch));
776 776
 
777
-        if (! empty($manyToManyAnnot->mappedBy)) {
777
+        if ( ! empty($manyToManyAnnot->mappedBy)) {
778 778
             $assocMetadata->setMappedBy($manyToManyAnnot->mappedBy);
779 779
             $assocMetadata->setOwningSide(false);
780 780
         }
781 781
 
782
-        if (! empty($manyToManyAnnot->inversedBy)) {
782
+        if ( ! empty($manyToManyAnnot->inversedBy)) {
783 783
             $assocMetadata->setInversedBy($manyToManyAnnot->inversedBy);
784 784
         }
785 785
 
786
-        if (! empty($manyToManyAnnot->indexBy)) {
786
+        if ( ! empty($manyToManyAnnot->indexBy)) {
787 787
             $assocMetadata->setIndexedBy($manyToManyAnnot->indexBy);
788 788
         }
789 789
 
@@ -827,15 +827,15 @@  discard block
 block discarded – undo
827 827
 
828 828
         $fieldMetadata->setType(Type::getType($columnAnnot->type));
829 829
 
830
-        if (! empty($columnAnnot->name)) {
830
+        if ( ! empty($columnAnnot->name)) {
831 831
             $fieldMetadata->setColumnName($columnAnnot->name);
832 832
         }
833 833
 
834
-        if (! empty($columnAnnot->columnDefinition)) {
834
+        if ( ! empty($columnAnnot->columnDefinition)) {
835 835
             $fieldMetadata->setColumnDefinition($columnAnnot->columnDefinition);
836 836
         }
837 837
 
838
-        if (! empty($columnAnnot->length)) {
838
+        if ( ! empty($columnAnnot->length)) {
839 839
             $fieldMetadata->setLength($columnAnnot->length);
840 840
         }
841 841
 
@@ -858,11 +858,11 @@  discard block
 block discarded – undo
858 858
         Annotation\Table $tableAnnot,
859 859
         Mapping\TableMetadata $tableMetadata
860 860
     ) : void {
861
-        if (! empty($tableAnnot->name)) {
861
+        if ( ! empty($tableAnnot->name)) {
862 862
             $tableMetadata->setName($tableAnnot->name);
863 863
         }
864 864
 
865
-        if (! empty($tableAnnot->schema)) {
865
+        if ( ! empty($tableAnnot->schema)) {
866 866
             $tableMetadata->setSchema($tableAnnot->schema);
867 867
         }
868 868
 
@@ -898,11 +898,11 @@  discard block
 block discarded – undo
898 898
     ) : Mapping\JoinTableMetadata {
899 899
         $joinTable = new Mapping\JoinTableMetadata();
900 900
 
901
-        if (! empty($joinTableAnnot->name)) {
901
+        if ( ! empty($joinTableAnnot->name)) {
902 902
             $joinTable->setName($joinTableAnnot->name);
903 903
         }
904 904
 
905
-        if (! empty($joinTableAnnot->schema)) {
905
+        if ( ! empty($joinTableAnnot->schema)) {
906 906
             $joinTable->setSchema($joinTableAnnot->schema);
907 907
         }
908 908
 
@@ -930,22 +930,22 @@  discard block
 block discarded – undo
930 930
         $joinColumn = new Mapping\JoinColumnMetadata();
931 931
 
932 932
         // @todo Remove conditionals for name and referencedColumnName once naming strategy is brought into drivers
933
-        if (! empty($joinColumnAnnot->name)) {
933
+        if ( ! empty($joinColumnAnnot->name)) {
934 934
             $joinColumn->setColumnName($joinColumnAnnot->name);
935 935
         }
936 936
 
937
-        if (! empty($joinColumnAnnot->referencedColumnName)) {
937
+        if ( ! empty($joinColumnAnnot->referencedColumnName)) {
938 938
             $joinColumn->setReferencedColumnName($joinColumnAnnot->referencedColumnName);
939 939
         }
940 940
 
941 941
         $joinColumn->setNullable($joinColumnAnnot->nullable);
942 942
         $joinColumn->setUnique($joinColumnAnnot->unique);
943 943
 
944
-        if (! empty($joinColumnAnnot->fieldName)) {
944
+        if ( ! empty($joinColumnAnnot->fieldName)) {
945 945
             $joinColumn->setAliasedName($joinColumnAnnot->fieldName);
946 946
         }
947 947
 
948
-        if (! empty($joinColumnAnnot->columnDefinition)) {
948
+        if ( ! empty($joinColumnAnnot->columnDefinition)) {
949 949
             $joinColumn->setColumnDefinition($joinColumnAnnot->columnDefinition);
950 950
         }
951 951
 
@@ -967,7 +967,7 @@  discard block
 block discarded – undo
967 967
         $fieldName = null
968 968
     ) : Mapping\CacheMetadata {
969 969
         $baseRegion    = strtolower(str_replace('\\', '_', $metadata->getRootClassName()));
970
-        $defaultRegion = $baseRegion . ($fieldName ? '__' . $fieldName : '');
970
+        $defaultRegion = $baseRegion.($fieldName ? '__'.$fieldName : '');
971 971
 
972 972
         $usage  = constant(sprintf('%s::%s', Mapping\CacheUsage::class, $cacheAnnot->usage));
973 973
         $region = $cacheAnnot->region ?: $defaultRegion;
@@ -989,7 +989,7 @@  discard block
 block discarded – undo
989 989
         if ($parent && $parent->inheritanceType === Mapping\InheritanceType::SINGLE_TABLE) {
990 990
             // Handle the case where a middle mapped super class inherits from a single table inheritance tree.
991 991
             do {
992
-                if (! $parent->isMappedSuperclass) {
992
+                if ( ! $parent->isMappedSuperclass) {
993 993
                     $metadata->setTable($parent->table);
994 994
 
995 995
                     break;
@@ -1044,11 +1044,11 @@  discard block
 block discarded – undo
1044 1044
             $discriminatorColumn->setType(Type::getType($typeName));
1045 1045
             $discriminatorColumn->setColumnName($discriminatorColumnAnnotation->name);
1046 1046
 
1047
-            if (! empty($discriminatorColumnAnnotation->columnDefinition)) {
1047
+            if ( ! empty($discriminatorColumnAnnotation->columnDefinition)) {
1048 1048
                 $discriminatorColumn->setColumnDefinition($discriminatorColumnAnnotation->columnDefinition);
1049 1049
             }
1050 1050
 
1051
-            if (! empty($discriminatorColumnAnnotation->length)) {
1051
+            if ( ! empty($discriminatorColumnAnnotation->length)) {
1052 1052
                 $discriminatorColumn->setLength($discriminatorColumnAnnotation->length);
1053 1053
             }
1054 1054
         }
@@ -1100,7 +1100,7 @@  discard block
 block discarded – undo
1100 1100
             $entityListenersAnnot = $classAnnotations[Annotation\EntityListeners::class];
1101 1101
 
1102 1102
             foreach ($entityListenersAnnot->value as $listenerClassName) {
1103
-                if (! class_exists($listenerClassName)) {
1103
+                if ( ! class_exists($listenerClassName)) {
1104 1104
                     throw Mapping\MappingException::entityListenerClassNotFound(
1105 1105
                         $listenerClassName,
1106 1106
                         $metadata->getClassName()
@@ -1137,7 +1137,7 @@  discard block
 block discarded – undo
1137 1137
                 $fieldName = $associationOverride->name;
1138 1138
                 $property  = $metadata->getProperty($fieldName);
1139 1139
 
1140
-                if (! $property) {
1140
+                if ( ! $property) {
1141 1141
                     throw Mapping\MappingException::invalidOverrideFieldName($metadata->getClassName(), $fieldName);
1142 1142
                 }
1143 1143
 
@@ -1171,7 +1171,7 @@  discard block
 block discarded – undo
1171 1171
                 // Check for fetch
1172 1172
                 if ($associationOverride->fetch) {
1173 1173
                     $override->setFetchMode(
1174
-                        constant(Mapping\FetchMode::class . '::' . $associationOverride->fetch)
1174
+                        constant(Mapping\FetchMode::class.'::'.$associationOverride->fetch)
1175 1175
                     );
1176 1176
                 }
1177 1177
 
@@ -1260,7 +1260,7 @@  discard block
 block discarded – undo
1260 1260
     {
1261 1261
         $fetchModeConstant = sprintf('%s::%s', Mapping\FetchMode::class, $fetchMode);
1262 1262
 
1263
-        if (! defined($fetchModeConstant)) {
1263
+        if ( ! defined($fetchModeConstant)) {
1264 1264
             throw Mapping\MappingException::invalidFetchMode($className, $fetchMode);
1265 1265
         }
1266 1266
 
@@ -1306,7 +1306,7 @@  discard block
 block discarded – undo
1306 1306
         $classAnnotations = $this->reader->getClassAnnotations($reflectionClass);
1307 1307
 
1308 1308
         foreach ($classAnnotations as $key => $annot) {
1309
-            if (! is_numeric($key)) {
1309
+            if ( ! is_numeric($key)) {
1310 1310
                 continue;
1311 1311
             }
1312 1312
 
@@ -1324,7 +1324,7 @@  discard block
 block discarded – undo
1324 1324
         $propertyAnnotations = $this->reader->getPropertyAnnotations($reflectionProperty);
1325 1325
 
1326 1326
         foreach ($propertyAnnotations as $key => $annot) {
1327
-            if (! is_numeric($key)) {
1327
+            if ( ! is_numeric($key)) {
1328 1328
                 continue;
1329 1329
             }
1330 1330
 
@@ -1342,7 +1342,7 @@  discard block
 block discarded – undo
1342 1342
         $methodAnnotations = $this->reader->getMethodAnnotations($reflectionMethod);
1343 1343
 
1344 1344
         foreach ($methodAnnotations as $key => $annot) {
1345
-            if (! is_numeric($key)) {
1345
+            if ( ! is_numeric($key)) {
1346 1346
                 continue;
1347 1347
             }
1348 1348
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Driver/FileDriver.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -107,8 +107,8 @@  discard block
 block discarded – undo
107 107
         }
108 108
 
109 109
         $result = $this->loadMappingFile($this->locator->findMappingFile($className));
110
-        if (! isset($result[$className])) {
111
-            throw MappingException::invalidMappingFile($className, str_replace('\\', '.', $className) . $this->locator->getFileExtension());
110
+        if ( ! isset($result[$className])) {
111
+            throw MappingException::invalidMappingFile($className, str_replace('\\', '.', $className).$this->locator->getFileExtension());
112 112
         }
113 113
 
114 114
         $this->classCache[$className] = $result[$className];
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
             $this->initialize();
142 142
         }
143 143
 
144
-        if (! $this->classCache) {
144
+        if ( ! $this->classCache) {
145 145
             return (array) $this->locator->getAllClassNames($this->globalBasename);
146 146
         }
147 147
 
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
         $this->classCache = [];
176 176
         if ($this->globalBasename !== null) {
177 177
             foreach ($this->locator->getPaths() as $path) {
178
-                $file = $path . '/' . $this->globalBasename . $this->locator->getFileExtension();
178
+                $file = $path.'/'.$this->globalBasename.$this->locator->getFileExtension();
179 179
                 if (is_file($file)) {
180 180
                     $this->classCache = array_merge(
181 181
                         $this->classCache,
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Driver/NewAnnotationDriver.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 
137 137
         $classNames = array_filter(
138 138
             $this->locator->getAllClassNames(null),
139
-            function ($className) {
139
+            function($className) {
140 140
                 return ! $this->isTransient($className);
141 141
             }
142 142
         );
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
             $entityListenersAnnot = $classAnnotations[Annotation\EntityListeners::class];
255 255
 
256 256
             foreach ($entityListenersAnnot->value as $listenerClassName) {
257
-                if (! class_exists($listenerClassName)) {
257
+                if ( ! class_exists($listenerClassName)) {
258 258
                     throw Mapping\MappingException::entityListenerClassNotFound(
259 259
                         $listenerClassName,
260 260
                         $reflectionClass->getName()
@@ -301,15 +301,15 @@  discard block
 block discarded – undo
301 301
 
302 302
                     $discriminatorColumn->setColumnName($discriminatorColumnAnnot->name);
303 303
 
304
-                    if (! empty($discriminatorColumnAnnot->columnDefinition)) {
304
+                    if ( ! empty($discriminatorColumnAnnot->columnDefinition)) {
305 305
                         $discriminatorColumn->setColumnDefinition($discriminatorColumnAnnot->columnDefinition);
306 306
                     }
307 307
 
308
-                    if (! empty($discriminatorColumnAnnot->type)) {
308
+                    if ( ! empty($discriminatorColumnAnnot->type)) {
309 309
                         $discriminatorColumn->setType(Type::getType($discriminatorColumnAnnot->type));
310 310
                     }
311 311
 
312
-                    if (! empty($discriminatorColumnAnnot->length)) {
312
+                    if ( ! empty($discriminatorColumnAnnot->length)) {
313 313
                         $discriminatorColumn->setLength($discriminatorColumnAnnot->length);
314 314
                     }
315 315
                 }
@@ -364,11 +364,11 @@  discard block
 block discarded – undo
364 364
     {
365 365
         $table = new Mapping\TableMetadata();
366 366
 
367
-        if (! empty($tableAnnot->name)) {
367
+        if ( ! empty($tableAnnot->name)) {
368 368
             $table->setName($tableAnnot->name);
369 369
         }
370 370
 
371
-        if (! empty($tableAnnot->schema)) {
371
+        if ( ! empty($tableAnnot->schema)) {
372 372
             $table->setSchema($tableAnnot->schema);
373 373
         }
374 374
 
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
     ) {
413 413
         $usage         = constant(sprintf('%s::%s', Mapping\CacheUsage::class, $cacheAnnot->usage));
414 414
         $baseRegion    = strtolower(str_replace('\\', '_', $metadata->getRootClassName()));
415
-        $defaultRegion = $baseRegion . ($fieldName ? '__' . $fieldName : '');
415
+        $defaultRegion = $baseRegion.($fieldName ? '__'.$fieldName : '');
416 416
 
417 417
         return new Mapping\CacheMetadata($usage, $cacheAnnot->region ?: $defaultRegion);
418 418
     }
@@ -528,11 +528,11 @@  discard block
 block discarded – undo
528 528
             $fieldMetadata->setPrimaryKey(true);
529 529
         }
530 530
 
531
-        if (! empty($columnAnnot->columnDefinition)) {
531
+        if ( ! empty($columnAnnot->columnDefinition)) {
532 532
             $fieldMetadata->setColumnDefinition($columnAnnot->columnDefinition);
533 533
         }
534 534
 
535
-        if (! empty($columnAnnot->length)) {
535
+        if ( ! empty($columnAnnot->length)) {
536 536
             $fieldMetadata->setLength($columnAnnot->length);
537 537
         }
538 538
 
@@ -553,7 +553,7 @@  discard block
 block discarded – undo
553 553
                     break;
554 554
 
555 555
                 default:
556
-                    if (! isset($customOptions['default'])) {
556
+                    if ( ! isset($customOptions['default'])) {
557 557
                         throw Mapping\MappingException::unsupportedOptimisticLockingType($fieldMetadata->getType());
558 558
                     }
559 559
             }
@@ -591,11 +591,11 @@  discard block
 block discarded – undo
591 591
         $assocMetadata->setOrphanRemoval($oneToOneAnnot->orphanRemoval);
592 592
         $assocMetadata->setFetchMode($this->getFetchMode($className, $oneToOneAnnot->fetch));
593 593
 
594
-        if (! empty($oneToOneAnnot->mappedBy)) {
594
+        if ( ! empty($oneToOneAnnot->mappedBy)) {
595 595
             $assocMetadata->setMappedBy($oneToOneAnnot->mappedBy);
596 596
         }
597 597
 
598
-        if (! empty($oneToOneAnnot->inversedBy)) {
598
+        if ( ! empty($oneToOneAnnot->inversedBy)) {
599 599
             $assocMetadata->setInversedBy($oneToOneAnnot->inversedBy);
600 600
         }
601 601
 
@@ -671,7 +671,7 @@  discard block
 block discarded – undo
671 671
         $assocMetadata->setCascade($this->getCascade($className, $fieldName, $manyToOneAnnot->cascade));
672 672
         $assocMetadata->setFetchMode($this->getFetchMode($className, $manyToOneAnnot->fetch));
673 673
 
674
-        if (! empty($manyToOneAnnot->inversedBy)) {
674
+        if ( ! empty($manyToOneAnnot->inversedBy)) {
675 675
             $assocMetadata->setInversedBy($manyToOneAnnot->inversedBy);
676 676
         }
677 677
 
@@ -748,11 +748,11 @@  discard block
 block discarded – undo
748 748
         $assocMetadata->setOrphanRemoval($oneToManyAnnot->orphanRemoval);
749 749
         $assocMetadata->setFetchMode($this->getFetchMode($className, $oneToManyAnnot->fetch));
750 750
 
751
-        if (! empty($oneToManyAnnot->mappedBy)) {
751
+        if ( ! empty($oneToManyAnnot->mappedBy)) {
752 752
             $assocMetadata->setMappedBy($oneToManyAnnot->mappedBy);
753 753
         }
754 754
 
755
-        if (! empty($oneToManyAnnot->indexBy)) {
755
+        if ( ! empty($oneToManyAnnot->indexBy)) {
756 756
             $assocMetadata->setIndexedBy($oneToManyAnnot->indexBy);
757 757
         }
758 758
 
@@ -806,15 +806,15 @@  discard block
 block discarded – undo
806 806
         $assocMetadata->setOrphanRemoval($manyToManyAnnot->orphanRemoval);
807 807
         $assocMetadata->setFetchMode($this->getFetchMode($className, $manyToManyAnnot->fetch));
808 808
 
809
-        if (! empty($manyToManyAnnot->mappedBy)) {
809
+        if ( ! empty($manyToManyAnnot->mappedBy)) {
810 810
             $assocMetadata->setMappedBy($manyToManyAnnot->mappedBy);
811 811
         }
812 812
 
813
-        if (! empty($manyToManyAnnot->inversedBy)) {
813
+        if ( ! empty($manyToManyAnnot->inversedBy)) {
814 814
             $assocMetadata->setInversedBy($manyToManyAnnot->inversedBy);
815 815
         }
816 816
 
817
-        if (! empty($manyToManyAnnot->indexBy)) {
817
+        if ( ! empty($manyToManyAnnot->indexBy)) {
818 818
             $assocMetadata->setIndexedBy($manyToManyAnnot->indexBy);
819 819
         }
820 820
 
@@ -865,11 +865,11 @@  discard block
 block discarded – undo
865 865
     ) {
866 866
         $joinTable = new Mapping\JoinTableMetadata();
867 867
 
868
-        if (! empty($joinTableAnnot->name)) {
868
+        if ( ! empty($joinTableAnnot->name)) {
869 869
             $joinTable->setName($joinTableAnnot->name);
870 870
         }
871 871
 
872
-        if (! empty($joinTableAnnot->schema)) {
872
+        if ( ! empty($joinTableAnnot->schema)) {
873 873
             $joinTable->setSchema($joinTableAnnot->schema);
874 874
         }
875 875
 
@@ -922,11 +922,11 @@  discard block
 block discarded – undo
922 922
         $joinColumn->setNullable($joinColumnAnnot->nullable);
923 923
         $joinColumn->setUnique($joinColumnAnnot->unique);
924 924
 
925
-        if (! empty($joinColumnAnnot->fieldName)) {
925
+        if ( ! empty($joinColumnAnnot->fieldName)) {
926 926
             $joinColumn->setAliasedName($joinColumnAnnot->fieldName);
927 927
         }
928 928
 
929
-        if (! empty($joinColumnAnnot->columnDefinition)) {
929
+        if ( ! empty($joinColumnAnnot->columnDefinition)) {
930 930
             $joinColumn->setColumnDefinition($joinColumnAnnot->columnDefinition);
931 931
         }
932 932
 
@@ -982,7 +982,7 @@  discard block
 block discarded – undo
982 982
     {
983 983
         $fetchModeConstant = sprintf('%s::%s', Mapping\FetchMode::class, $fetchMode);
984 984
 
985
-        if (! defined($fetchModeConstant)) {
985
+        if ( ! defined($fetchModeConstant)) {
986 986
             throw Mapping\MappingException::invalidFetchMode($className, $fetchMode);
987 987
         }
988 988
 
@@ -1024,7 +1024,7 @@  discard block
 block discarded – undo
1024 1024
         $classAnnotations = $this->reader->getClassAnnotations($reflectionClass);
1025 1025
 
1026 1026
         foreach ($classAnnotations as $key => $annot) {
1027
-            if (! is_numeric($key)) {
1027
+            if ( ! is_numeric($key)) {
1028 1028
                 continue;
1029 1029
             }
1030 1030
 
@@ -1042,7 +1042,7 @@  discard block
 block discarded – undo
1042 1042
         $propertyAnnotations = $this->reader->getPropertyAnnotations($reflectionProperty);
1043 1043
 
1044 1044
         foreach ($propertyAnnotations as $key => $annot) {
1045
-            if (! is_numeric($key)) {
1045
+            if ( ! is_numeric($key)) {
1046 1046
                 continue;
1047 1047
             }
1048 1048
 
@@ -1060,7 +1060,7 @@  discard block
 block discarded – undo
1060 1060
         $methodAnnotations = $this->reader->getMethodAnnotations($reflectionMethod);
1061 1061
 
1062 1062
         foreach ($methodAnnotations as $key => $annot) {
1063
-            if (! is_numeric($key)) {
1063
+            if ( ! is_numeric($key)) {
1064 1064
                 continue;
1065 1065
             }
1066 1066
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Driver/Annotation/AnnotationDriver.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
             return $this->classNames;
198 198
         }
199 199
 
200
-        if (! $this->paths) {
200
+        if ( ! $this->paths) {
201 201
             throw Mapping\MappingException::pathRequired();
202 202
         }
203 203
 
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
         $includedFiles = [];
206 206
 
207 207
         foreach ($this->paths as $path) {
208
-            if (! is_dir($path)) {
208
+            if ( ! is_dir($path)) {
209 209
                 throw Mapping\MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path);
210 210
             }
211 211
 
@@ -214,14 +214,14 @@  discard block
 block discarded – undo
214 214
                     new \RecursiveDirectoryIterator($path, \FilesystemIterator::SKIP_DOTS),
215 215
                     \RecursiveIteratorIterator::LEAVES_ONLY
216 216
                 ),
217
-                '/^.+' . preg_quote($this->fileExtension) . '$/i',
217
+                '/^.+'.preg_quote($this->fileExtension).'$/i',
218 218
                 \RecursiveRegexIterator::GET_MATCH
219 219
             );
220 220
 
221 221
             foreach ($iterator as $file) {
222 222
                 $sourceFile = $file[0];
223 223
 
224
-                if (! preg_match('(^phar:)i', $sourceFile)) {
224
+                if ( ! preg_match('(^phar:)i', $sourceFile)) {
225 225
                     $sourceFile = realpath($sourceFile);
226 226
                 }
227 227
 
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
     ) : Mapping\ClassMetadata {
270 270
         $reflectionClass = $metadata->getReflectionClass();
271 271
 
272
-        if (! $reflectionClass) {
272
+        if ( ! $reflectionClass) {
273 273
             // this happens when running annotation driver in combination with
274 274
             // static reflection services. This is not the nicest fix
275 275
             $reflectionClass = new \ReflectionClass($metadata->getClassName());
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
                 $metadataBuildingContext
307 307
             );
308 308
 
309
-            if (! $property) {
309
+            if ( ! $property) {
310 310
                 continue;
311 311
             }
312 312
 
@@ -603,11 +603,11 @@  discard block
 block discarded – undo
603 603
         $assocMetadata->setOrphanRemoval($oneToOneAnnot->orphanRemoval);
604 604
         $assocMetadata->setFetchMode($this->getFetchMode($className, $oneToOneAnnot->fetch));
605 605
 
606
-        if (! empty($oneToOneAnnot->mappedBy)) {
606
+        if ( ! empty($oneToOneAnnot->mappedBy)) {
607 607
             $assocMetadata->setMappedBy($oneToOneAnnot->mappedBy);
608 608
         }
609 609
 
610
-        if (! empty($oneToOneAnnot->inversedBy)) {
610
+        if ( ! empty($oneToOneAnnot->inversedBy)) {
611 611
             $assocMetadata->setInversedBy($oneToOneAnnot->inversedBy);
612 612
         }
613 613
 
@@ -665,7 +665,7 @@  discard block
 block discarded – undo
665 665
         $assocMetadata->setCascade($this->getCascade($className, $fieldName, $manyToOneAnnot->cascade));
666 666
         $assocMetadata->setFetchMode($this->getFetchMode($className, $manyToOneAnnot->fetch));
667 667
 
668
-        if (! empty($manyToOneAnnot->inversedBy)) {
668
+        if ( ! empty($manyToOneAnnot->inversedBy)) {
669 669
             $assocMetadata->setInversedBy($manyToOneAnnot->inversedBy);
670 670
         }
671 671
 
@@ -724,11 +724,11 @@  discard block
 block discarded – undo
724 724
         $assocMetadata->setOrphanRemoval($oneToManyAnnot->orphanRemoval);
725 725
         $assocMetadata->setFetchMode($this->getFetchMode($className, $oneToManyAnnot->fetch));
726 726
 
727
-        if (! empty($oneToManyAnnot->mappedBy)) {
727
+        if ( ! empty($oneToManyAnnot->mappedBy)) {
728 728
             $assocMetadata->setMappedBy($oneToManyAnnot->mappedBy);
729 729
         }
730 730
 
731
-        if (! empty($oneToManyAnnot->indexBy)) {
731
+        if ( ! empty($oneToManyAnnot->indexBy)) {
732 732
             $assocMetadata->setIndexedBy($oneToManyAnnot->indexBy);
733 733
         }
734 734
 
@@ -771,15 +771,15 @@  discard block
 block discarded – undo
771 771
         $assocMetadata->setOrphanRemoval($manyToManyAnnot->orphanRemoval);
772 772
         $assocMetadata->setFetchMode($this->getFetchMode($className, $manyToManyAnnot->fetch));
773 773
 
774
-        if (! empty($manyToManyAnnot->mappedBy)) {
774
+        if ( ! empty($manyToManyAnnot->mappedBy)) {
775 775
             $assocMetadata->setMappedBy($manyToManyAnnot->mappedBy);
776 776
         }
777 777
 
778
-        if (! empty($manyToManyAnnot->inversedBy)) {
778
+        if ( ! empty($manyToManyAnnot->inversedBy)) {
779 779
             $assocMetadata->setInversedBy($manyToManyAnnot->inversedBy);
780 780
         }
781 781
 
782
-        if (! empty($manyToManyAnnot->indexBy)) {
782
+        if ( ! empty($manyToManyAnnot->indexBy)) {
783 783
             $assocMetadata->setIndexedBy($manyToManyAnnot->indexBy);
784 784
         }
785 785
 
@@ -823,15 +823,15 @@  discard block
 block discarded – undo
823 823
 
824 824
         $fieldMetadata->setType(Type::getType($columnAnnot->type));
825 825
 
826
-        if (! empty($columnAnnot->name)) {
826
+        if ( ! empty($columnAnnot->name)) {
827 827
             $fieldMetadata->setColumnName($columnAnnot->name);
828 828
         }
829 829
 
830
-        if (! empty($columnAnnot->columnDefinition)) {
830
+        if ( ! empty($columnAnnot->columnDefinition)) {
831 831
             $fieldMetadata->setColumnDefinition($columnAnnot->columnDefinition);
832 832
         }
833 833
 
834
-        if (! empty($columnAnnot->length)) {
834
+        if ( ! empty($columnAnnot->length)) {
835 835
             $fieldMetadata->setLength($columnAnnot->length);
836 836
         }
837 837
 
@@ -854,11 +854,11 @@  discard block
 block discarded – undo
854 854
         Annotation\Table $tableAnnot,
855 855
         Mapping\TableMetadata $table
856 856
     ) : Mapping\TableMetadata {
857
-        if (! empty($tableAnnot->name)) {
857
+        if ( ! empty($tableAnnot->name)) {
858 858
             $table->setName($tableAnnot->name);
859 859
         }
860 860
 
861
-        if (! empty($tableAnnot->schema)) {
861
+        if ( ! empty($tableAnnot->schema)) {
862 862
             $table->setSchema($tableAnnot->schema);
863 863
         }
864 864
 
@@ -896,11 +896,11 @@  discard block
 block discarded – undo
896 896
     ) : Mapping\JoinTableMetadata {
897 897
         $joinTable = new Mapping\JoinTableMetadata();
898 898
 
899
-        if (! empty($joinTableAnnot->name)) {
899
+        if ( ! empty($joinTableAnnot->name)) {
900 900
             $joinTable->setName($joinTableAnnot->name);
901 901
         }
902 902
 
903
-        if (! empty($joinTableAnnot->schema)) {
903
+        if ( ! empty($joinTableAnnot->schema)) {
904 904
             $joinTable->setSchema($joinTableAnnot->schema);
905 905
         }
906 906
 
@@ -928,22 +928,22 @@  discard block
 block discarded – undo
928 928
         $joinColumn = new Mapping\JoinColumnMetadata();
929 929
 
930 930
         // @todo Remove conditionals for name and referencedColumnName once naming strategy is brought into drivers
931
-        if (! empty($joinColumnAnnot->name)) {
931
+        if ( ! empty($joinColumnAnnot->name)) {
932 932
             $joinColumn->setColumnName($joinColumnAnnot->name);
933 933
         }
934 934
 
935
-        if (! empty($joinColumnAnnot->referencedColumnName)) {
935
+        if ( ! empty($joinColumnAnnot->referencedColumnName)) {
936 936
             $joinColumn->setReferencedColumnName($joinColumnAnnot->referencedColumnName);
937 937
         }
938 938
 
939 939
         $joinColumn->setNullable($joinColumnAnnot->nullable);
940 940
         $joinColumn->setUnique($joinColumnAnnot->unique);
941 941
 
942
-        if (! empty($joinColumnAnnot->fieldName)) {
942
+        if ( ! empty($joinColumnAnnot->fieldName)) {
943 943
             $joinColumn->setAliasedName($joinColumnAnnot->fieldName);
944 944
         }
945 945
 
946
-        if (! empty($joinColumnAnnot->columnDefinition)) {
946
+        if ( ! empty($joinColumnAnnot->columnDefinition)) {
947 947
             $joinColumn->setColumnDefinition($joinColumnAnnot->columnDefinition);
948 948
         }
949 949
 
@@ -965,7 +965,7 @@  discard block
 block discarded – undo
965 965
         $fieldName = null
966 966
     ) : Mapping\CacheMetadata {
967 967
         $baseRegion    = strtolower(str_replace('\\', '_', $metadata->getRootClassName()));
968
-        $defaultRegion = $baseRegion . ($fieldName ? '__' . $fieldName : '');
968
+        $defaultRegion = $baseRegion.($fieldName ? '__'.$fieldName : '');
969 969
 
970 970
         $usage  = constant(sprintf('%s::%s', Mapping\CacheUsage::class, $cacheAnnot->usage));
971 971
         $region = $cacheAnnot->region ?: $defaultRegion;
@@ -1034,11 +1034,11 @@  discard block
 block discarded – undo
1034 1034
             $discriminatorColumn->setType(Type::getType($typeName));
1035 1035
             $discriminatorColumn->setColumnName($discriminatorColumnAnnotation->name);
1036 1036
 
1037
-            if (! empty($discriminatorColumnAnnotation->columnDefinition)) {
1037
+            if ( ! empty($discriminatorColumnAnnotation->columnDefinition)) {
1038 1038
                 $discriminatorColumn->setColumnDefinition($discriminatorColumnAnnotation->columnDefinition);
1039 1039
             }
1040 1040
 
1041
-            if (! empty($discriminatorColumnAnnotation->length)) {
1041
+            if ( ! empty($discriminatorColumnAnnotation->length)) {
1042 1042
                 $discriminatorColumn->setLength($discriminatorColumnAnnotation->length);
1043 1043
             }
1044 1044
         }
@@ -1090,7 +1090,7 @@  discard block
 block discarded – undo
1090 1090
             $entityListenersAnnot = $classAnnotations[Annotation\EntityListeners::class];
1091 1091
 
1092 1092
             foreach ($entityListenersAnnot->value as $listenerClassName) {
1093
-                if (! class_exists($listenerClassName)) {
1093
+                if ( ! class_exists($listenerClassName)) {
1094 1094
                     throw Mapping\MappingException::entityListenerClassNotFound(
1095 1095
                         $listenerClassName,
1096 1096
                         $metadata->getClassName()
@@ -1128,7 +1128,7 @@  discard block
 block discarded – undo
1128 1128
                 $fieldName = $associationOverride->name;
1129 1129
                 $property  = $metadata->getProperty($fieldName);
1130 1130
 
1131
-                if (! $property) {
1131
+                if ( ! $property) {
1132 1132
                     throw Mapping\MappingException::invalidOverrideFieldName($metadata->getClassName(), $fieldName);
1133 1133
                 }
1134 1134
 
@@ -1162,7 +1162,7 @@  discard block
 block discarded – undo
1162 1162
                 // Check for fetch
1163 1163
                 if ($associationOverride->fetch) {
1164 1164
                     $override->setFetchMode(
1165
-                        constant(Mapping\FetchMode::class . '::' . $associationOverride->fetch)
1165
+                        constant(Mapping\FetchMode::class.'::'.$associationOverride->fetch)
1166 1166
                     );
1167 1167
                 }
1168 1168
 
@@ -1251,7 +1251,7 @@  discard block
 block discarded – undo
1251 1251
     {
1252 1252
         $fetchModeConstant = sprintf('%s::%s', Mapping\FetchMode::class, $fetchMode);
1253 1253
 
1254
-        if (! defined($fetchModeConstant)) {
1254
+        if ( ! defined($fetchModeConstant)) {
1255 1255
             throw Mapping\MappingException::invalidFetchMode($className, $fetchMode);
1256 1256
         }
1257 1257
 
@@ -1297,7 +1297,7 @@  discard block
 block discarded – undo
1297 1297
         $classAnnotations = $this->reader->getClassAnnotations($reflectionClass);
1298 1298
 
1299 1299
         foreach ($classAnnotations as $key => $annot) {
1300
-            if (! is_numeric($key)) {
1300
+            if ( ! is_numeric($key)) {
1301 1301
                 continue;
1302 1302
             }
1303 1303
 
@@ -1315,7 +1315,7 @@  discard block
 block discarded – undo
1315 1315
         $propertyAnnotations = $this->reader->getPropertyAnnotations($reflectionProperty);
1316 1316
 
1317 1317
         foreach ($propertyAnnotations as $key => $annot) {
1318
-            if (! is_numeric($key)) {
1318
+            if ( ! is_numeric($key)) {
1319 1319
                 continue;
1320 1320
             }
1321 1321
 
@@ -1333,7 +1333,7 @@  discard block
 block discarded – undo
1333 1333
         $methodAnnotations = $this->reader->getMethodAnnotations($reflectionMethod);
1334 1334
 
1335 1335
         foreach ($methodAnnotations as $key => $annot) {
1336
-            if (! is_numeric($key)) {
1336
+            if ( ! is_numeric($key)) {
1337 1337
                 continue;
1338 1338
             }
1339 1339
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Driver/DriverChain.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
         foreach ($this->drivers as $namespace => $driver) {
100 100
             $oid = spl_object_id($driver);
101 101
 
102
-            if (! isset($driverClasses[$oid])) {
102
+            if ( ! isset($driverClasses[$oid])) {
103 103
                 $driverClasses[$oid] = $driver->getAllClassNames();
104 104
             }
105 105
 
Please login to merge, or discard this patch.