Failed Conditions
Push — master ( ee4e26...e98654 )
by Marco
13:06
created
lib/Doctrine/ORM/Annotation/DoctrineAnnotations.php 1 patch
Spacing   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -1,52 +1,52 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5
-require_once __DIR__ . '/Annotation.php';
6
-require_once __DIR__ . '/AssociationOverride.php';
7
-require_once __DIR__ . '/AssociationOverrides.php';
8
-require_once __DIR__ . '/AttributeOverride.php';
9
-require_once __DIR__ . '/AttributeOverrides.php';
10
-require_once __DIR__ . '/Cache.php';
11
-require_once __DIR__ . '/ChangeTrackingPolicy.php';
12
-require_once __DIR__ . '/Column.php';
13
-require_once __DIR__ . '/ColumnResult.php';
14
-require_once __DIR__ . '/CustomIdGenerator.php';
15
-require_once __DIR__ . '/DiscriminatorColumn.php';
16
-require_once __DIR__ . '/DiscriminatorMap.php';
17
-require_once __DIR__ . '/Embeddable.php';
18
-require_once __DIR__ . '/Embedded.php';
19
-require_once __DIR__ . '/Entity.php';
20
-require_once __DIR__ . '/EntityListeners.php';
21
-require_once __DIR__ . '/EntityResult.php';
22
-require_once __DIR__ . '/FieldResult.php';
23
-require_once __DIR__ . '/GeneratedValue.php';
24
-require_once __DIR__ . '/HasLifecycleCallbacks.php';
25
-require_once __DIR__ . '/Id.php';
26
-require_once __DIR__ . '/Index.php';
27
-require_once __DIR__ . '/InheritanceType.php';
28
-require_once __DIR__ . '/JoinColumn.php';
29
-require_once __DIR__ . '/JoinColumns.php';
30
-require_once __DIR__ . '/JoinTable.php';
31
-require_once __DIR__ . '/ManyToMany.php';
32
-require_once __DIR__ . '/ManyToOne.php';
33
-require_once __DIR__ . '/MappedSuperclass.php';
34
-require_once __DIR__ . '/NamedNativeQueries.php';
35
-require_once __DIR__ . '/NamedNativeQuery.php';
36
-require_once __DIR__ . '/OneToMany.php';
37
-require_once __DIR__ . '/OneToOne.php';
38
-require_once __DIR__ . '/OrderBy.php';
39
-require_once __DIR__ . '/PrePersist.php';
40
-require_once __DIR__ . '/PostLoad.php';
41
-require_once __DIR__ . '/PostPersist.php';
42
-require_once __DIR__ . '/PostRemove.php';
43
-require_once __DIR__ . '/PostUpdate.php';
44
-require_once __DIR__ . '/PreFlush.php';
45
-require_once __DIR__ . '/PreRemove.php';
46
-require_once __DIR__ . '/PreUpdate.php';
47
-require_once __DIR__ . '/SequenceGenerator.php';
48
-require_once __DIR__ . '/SqlResultSetMapping.php';
49
-require_once __DIR__ . '/SqlResultSetMappings.php';
50
-require_once __DIR__ . '/Table.php';
51
-require_once __DIR__ . '/UniqueConstraint.php';
52
-require_once __DIR__ . '/Version.php';
5
+require_once __DIR__.'/Annotation.php';
6
+require_once __DIR__.'/AssociationOverride.php';
7
+require_once __DIR__.'/AssociationOverrides.php';
8
+require_once __DIR__.'/AttributeOverride.php';
9
+require_once __DIR__.'/AttributeOverrides.php';
10
+require_once __DIR__.'/Cache.php';
11
+require_once __DIR__.'/ChangeTrackingPolicy.php';
12
+require_once __DIR__.'/Column.php';
13
+require_once __DIR__.'/ColumnResult.php';
14
+require_once __DIR__.'/CustomIdGenerator.php';
15
+require_once __DIR__.'/DiscriminatorColumn.php';
16
+require_once __DIR__.'/DiscriminatorMap.php';
17
+require_once __DIR__.'/Embeddable.php';
18
+require_once __DIR__.'/Embedded.php';
19
+require_once __DIR__.'/Entity.php';
20
+require_once __DIR__.'/EntityListeners.php';
21
+require_once __DIR__.'/EntityResult.php';
22
+require_once __DIR__.'/FieldResult.php';
23
+require_once __DIR__.'/GeneratedValue.php';
24
+require_once __DIR__.'/HasLifecycleCallbacks.php';
25
+require_once __DIR__.'/Id.php';
26
+require_once __DIR__.'/Index.php';
27
+require_once __DIR__.'/InheritanceType.php';
28
+require_once __DIR__.'/JoinColumn.php';
29
+require_once __DIR__.'/JoinColumns.php';
30
+require_once __DIR__.'/JoinTable.php';
31
+require_once __DIR__.'/ManyToMany.php';
32
+require_once __DIR__.'/ManyToOne.php';
33
+require_once __DIR__.'/MappedSuperclass.php';
34
+require_once __DIR__.'/NamedNativeQueries.php';
35
+require_once __DIR__.'/NamedNativeQuery.php';
36
+require_once __DIR__.'/OneToMany.php';
37
+require_once __DIR__.'/OneToOne.php';
38
+require_once __DIR__.'/OrderBy.php';
39
+require_once __DIR__.'/PrePersist.php';
40
+require_once __DIR__.'/PostLoad.php';
41
+require_once __DIR__.'/PostPersist.php';
42
+require_once __DIR__.'/PostRemove.php';
43
+require_once __DIR__.'/PostUpdate.php';
44
+require_once __DIR__.'/PreFlush.php';
45
+require_once __DIR__.'/PreRemove.php';
46
+require_once __DIR__.'/PreUpdate.php';
47
+require_once __DIR__.'/SequenceGenerator.php';
48
+require_once __DIR__.'/SqlResultSetMapping.php';
49
+require_once __DIR__.'/SqlResultSetMappings.php';
50
+require_once __DIR__.'/Table.php';
51
+require_once __DIR__.'/UniqueConstraint.php';
52
+require_once __DIR__.'/Version.php';
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Configuration.php 1 patch
Spacing   +6 added lines, -6 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
 
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
      */
195 195
     public function newDefaultAnnotationDriver(array $paths = []) : AnnotationDriver
196 196
     {
197
-        AnnotationRegistry::registerFile(__DIR__ . '/Annotation/DoctrineAnnotations.php');
197
+        AnnotationRegistry::registerFile(__DIR__.'/Annotation/DoctrineAnnotations.php');
198 198
 
199 199
         $reader = new CachedReader(new AnnotationReader(), new ArrayCache());
200 200
 
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
      */
275 275
     public function getNamedNativeQuery(string $queryName) : array
276 276
     {
277
-        if (! isset($this->namedNativeQueries[$queryName])) {
277
+        if ( ! isset($this->namedNativeQueries[$queryName])) {
278 278
             throw ORMException::namedNativeQueryNotFound($queryName);
279 279
         }
280 280
 
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
     {
293 293
         $queryCacheImpl = $this->getQueryCacheImpl();
294 294
 
295
-        if (! $queryCacheImpl) {
295
+        if ( ! $queryCacheImpl) {
296 296
             throw ORMException::queryCacheNotConfigured();
297 297
         }
298 298
 
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
 
303 303
         $metadataCacheImpl = $this->getMetadataCacheImpl();
304 304
 
305
-        if (! $metadataCacheImpl) {
305
+        if ( ! $metadataCacheImpl) {
306 306
             throw ORMException::metadataCacheNotConfigured();
307 307
         }
308 308
 
@@ -510,7 +510,7 @@  discard block
 block discarded – undo
510 510
     {
511 511
         $reflectionClass = new \ReflectionClass($repositoryClassName);
512 512
 
513
-        if (! $reflectionClass->implementsInterface(ObjectRepository::class)) {
513
+        if ( ! $reflectionClass->implementsInterface(ObjectRepository::class)) {
514 514
             throw ORMException::invalidEntityRepository($repositoryClassName);
515 515
         }
516 516
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/ClassMetadata.php 1 patch
Spacing   +48 added lines, -48 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\Mapping;
6 6
 
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
      */
281 281
     public function __toString()
282 282
     {
283
-        return __CLASS__ . '@' . spl_object_id($this);
283
+        return __CLASS__.'@'.spl_object_id($this);
284 284
     }
285 285
 
286 286
     /**
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
         // Restore ReflectionClass and properties
376 376
         $this->reflectionClass = $reflectionService->getClass($this->className);
377 377
 
378
-        if (! $this->reflectionClass) {
378
+        if ( ! $this->reflectionClass) {
379 379
             return;
380 380
         }
381 381
 
@@ -399,11 +399,11 @@  discard block
 block discarded – undo
399 399
         }
400 400
 
401 401
         // Verify & complete identifier mapping
402
-        if (! $this->identifier) {
402
+        if ( ! $this->identifier) {
403 403
             throw MappingException::identifierRequired($this->className);
404 404
         }
405 405
 
406
-        $explicitlyGeneratedProperties = array_filter($this->declaredProperties, function (Property $property) : bool {
406
+        $explicitlyGeneratedProperties = array_filter($this->declaredProperties, function(Property $property) : bool {
407 407
             return $property instanceof FieldMetadata
408 408
                 && $property->isPrimaryKey()
409 409
                 && $property->hasValueGenerator();
@@ -422,14 +422,14 @@  discard block
 block discarded – undo
422 422
     public function validateAssociations() : void
423 423
     {
424 424
         array_map(
425
-            function (Property $property) {
426
-                if (! ($property instanceof AssociationMetadata)) {
425
+            function(Property $property) {
426
+                if ( ! ($property instanceof AssociationMetadata)) {
427 427
                     return;
428 428
                 }
429 429
 
430 430
                 $targetEntity = $property->getTargetEntity();
431 431
 
432
-                if (! class_exists($targetEntity)) {
432
+                if ( ! class_exists($targetEntity)) {
433 433
                     throw MappingException::invalidTargetEntityClass($targetEntity, $this->className, $property->getName());
434 434
                 }
435 435
             },
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
         foreach ($this->lifecycleCallbacks as $callbacks) {
448 448
             /** @var array $callbacks */
449 449
             foreach ($callbacks as $callbackFuncName) {
450
-                if (! $reflectionService->hasPublicMethod($this->className, $callbackFuncName)) {
450
+                if ( ! $reflectionService->hasPublicMethod($this->className, $callbackFuncName)) {
451 451
                     throw MappingException::lifecycleCallbackMethodNotFound($this->className, $callbackFuncName);
452 452
                 }
453 453
             }
@@ -471,11 +471,11 @@  discard block
 block discarded – undo
471 471
      */
472 472
     public function isIdentifier(string $fieldName) : bool
473 473
     {
474
-        if (! $this->identifier) {
474
+        if ( ! $this->identifier) {
475 475
             return false;
476 476
         }
477 477
 
478
-        if (! $this->isIdentifierComposite()) {
478
+        if ( ! $this->isIdentifierComposite()) {
479 479
             return $fieldName === $this->identifier[0];
480 480
         }
481 481
 
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
      */
501 501
     public function getNamedNativeQuery($queryName) : array
502 502
     {
503
-        if (! isset($this->namedNativeQueries[$queryName])) {
503
+        if ( ! isset($this->namedNativeQueries[$queryName])) {
504 504
             throw MappingException::queryNotFound($this->className, $queryName);
505 505
         }
506 506
 
@@ -530,7 +530,7 @@  discard block
 block discarded – undo
530 530
      */
531 531
     public function getSqlResultSetMapping($name)
532 532
     {
533
-        if (! isset($this->sqlResultSetMappings[$name])) {
533
+        if ( ! isset($this->sqlResultSetMappings[$name])) {
534 534
             throw MappingException::resultMappingNotFound($this->className, $name);
535 535
         }
536 536
 
@@ -563,7 +563,7 @@  discard block
 block discarded – undo
563 563
             $property->setColumnName($columnName);
564 564
         }
565 565
 
566
-        if (! $this->isMappedSuperclass) {
566
+        if ( ! $this->isMappedSuperclass) {
567 567
             $property->setTableName($this->getTableName());
568 568
         }
569 569
 
@@ -583,7 +583,7 @@  discard block
 block discarded – undo
583 583
                 throw MappingException::sqlConversionNotAllowedForPrimaryKeyProperties($property);
584 584
             }
585 585
 
586
-            if (! in_array($fieldName, $this->identifier, true)) {
586
+            if ( ! in_array($fieldName, $this->identifier, true)) {
587 587
                 $this->identifier[] = $fieldName;
588 588
             }
589 589
         }
@@ -633,7 +633,7 @@  discard block
 block discarded – undo
633 633
         $fieldName    = $property->getName();
634 634
         $targetEntity = $property->getTargetEntity();
635 635
 
636
-        if (! $targetEntity) {
636
+        if ( ! $targetEntity) {
637 637
             throw MappingException::missingTargetEntity($fieldName);
638 638
         }
639 639
 
@@ -647,7 +647,7 @@  discard block
 block discarded – undo
647 647
                 throw MappingException::illegalOrphanRemovalOnIdentifierAssociation($this->className, $fieldName);
648 648
             }
649 649
 
650
-            if (! in_array($property->getName(), $this->identifier, true)) {
650
+            if ( ! in_array($property->getName(), $this->identifier, true)) {
651 651
                 if ($property instanceof ToOneAssociationMetadata && count($property->getJoinColumns()) >= 2) {
652 652
                     throw MappingException::cannotMapCompositePrimaryKeyEntitiesAsForeignId(
653 653
                         $property->getTargetEntity(),
@@ -713,7 +713,7 @@  discard block
 block discarded – undo
713 713
                 /** @var JoinColumnMetadata $joinColumn */
714 714
                 if ($property instanceof OneToOneAssociationMetadata && $this->inheritanceType !== InheritanceType::SINGLE_TABLE) {
715 715
                     if (count($property->getJoinColumns()) === 1) {
716
-                        if (! $property->isPrimaryKey()) {
716
+                        if ( ! $property->isPrimaryKey()) {
717 717
                             $joinColumn->setUnique(true);
718 718
                         }
719 719
                     } else {
@@ -721,13 +721,13 @@  discard block
 block discarded – undo
721 721
                     }
722 722
                 }
723 723
 
724
-                $joinColumn->setTableName(! $this->isMappedSuperclass ? $this->getTableName() : null);
724
+                $joinColumn->setTableName( ! $this->isMappedSuperclass ? $this->getTableName() : null);
725 725
 
726
-                if (! $joinColumn->getColumnName()) {
726
+                if ( ! $joinColumn->getColumnName()) {
727 727
                     $joinColumn->setColumnName($this->namingStrategy->joinColumnName($fieldName, $this->className));
728 728
                 }
729 729
 
730
-                if (! $joinColumn->getReferencedColumnName()) {
730
+                if ( ! $joinColumn->getReferencedColumnName()) {
731 731
                     $joinColumn->setReferencedColumnName($this->namingStrategy->referenceColumnName());
732 732
                 }
733 733
 
@@ -735,7 +735,7 @@  discard block
 block discarded – undo
735 735
             }
736 736
 
737 737
             if ($uniqueConstraintColumns) {
738
-                if (! $this->table) {
738
+                if ( ! $this->table) {
739 739
                     throw new \RuntimeException(
740 740
                         'ClassMetadata::setTable() has to be called before defining a one to one relationship.'
741 741
                     );
@@ -755,7 +755,7 @@  discard block
 block discarded – undo
755 755
         if ($property->isOrphanRemoval()) {
756 756
             $cascades = $property->getCascade();
757 757
 
758
-            if (! in_array('remove', $cascades, true)) {
758
+            if ( ! in_array('remove', $cascades, true)) {
759 759
                 $cascades[] = 'remove';
760 760
 
761 761
                 $property->setCascade($cascades);
@@ -821,14 +821,14 @@  discard block
 block discarded – undo
821 821
         $property->setOwningSide(false);
822 822
 
823 823
         // OneToMany MUST have mappedBy
824
-        if (! $property->getMappedBy()) {
824
+        if ( ! $property->getMappedBy()) {
825 825
             throw MappingException::oneToManyRequiresMappedBy($property->getName());
826 826
         }
827 827
 
828 828
         if ($property->isOrphanRemoval()) {
829 829
             $cascades = $property->getCascade();
830 830
 
831
-            if (! in_array('remove', $cascades, true)) {
831
+            if ( ! in_array('remove', $cascades, true)) {
832 832
                 $cascades[] = 'remove';
833 833
 
834 834
                 $property->setCascade($cascades);
@@ -851,7 +851,7 @@  discard block
 block discarded – undo
851 851
 
852 852
             $property->setJoinTable($joinTable);
853 853
 
854
-            if (! $joinTable->getName()) {
854
+            if ( ! $joinTable->getName()) {
855 855
                 $joinTableName = $this->namingStrategy->joinTableName(
856 856
                     $property->getSourceEntity(),
857 857
                     $property->getTargetEntity(),
@@ -863,7 +863,7 @@  discard block
 block discarded – undo
863 863
 
864 864
             $selfReferencingEntityWithoutJoinColumns = $property->getSourceEntity() === $property->getTargetEntity() && ! $joinTable->hasColumns();
865 865
 
866
-            if (! $joinTable->getJoinColumns()) {
866
+            if ( ! $joinTable->getJoinColumns()) {
867 867
                 $referencedColumnName = $this->namingStrategy->referenceColumnName();
868 868
                 $sourceReferenceName  = $selfReferencingEntityWithoutJoinColumns ? 'source' : $referencedColumnName;
869 869
                 $columnName           = $this->namingStrategy->joinKeyColumnName($property->getSourceEntity(), $sourceReferenceName);
@@ -876,7 +876,7 @@  discard block
 block discarded – undo
876 876
                 $joinTable->addJoinColumn($joinColumn);
877 877
             }
878 878
 
879
-            if (! $joinTable->getInverseJoinColumns()) {
879
+            if ( ! $joinTable->getInverseJoinColumns()) {
880 880
                 $referencedColumnName = $this->namingStrategy->referenceColumnName();
881 881
                 $targetReferenceName  = $selfReferencingEntityWithoutJoinColumns ? 'target' : $referencedColumnName;
882 882
                 $columnName           = $this->namingStrategy->joinKeyColumnName($property->getTargetEntity(), $targetReferenceName);
@@ -891,13 +891,13 @@  discard block
 block discarded – undo
891 891
 
892 892
             foreach ($joinTable->getJoinColumns() as $joinColumn) {
893 893
                 /** @var JoinColumnMetadata $joinColumn */
894
-                if (! $joinColumn->getReferencedColumnName()) {
894
+                if ( ! $joinColumn->getReferencedColumnName()) {
895 895
                     $joinColumn->setReferencedColumnName($this->namingStrategy->referenceColumnName());
896 896
                 }
897 897
 
898 898
                 $referencedColumnName = $joinColumn->getReferencedColumnName();
899 899
 
900
-                if (! $joinColumn->getColumnName()) {
900
+                if ( ! $joinColumn->getColumnName()) {
901 901
                     $columnName = $this->namingStrategy->joinKeyColumnName(
902 902
                         $property->getSourceEntity(),
903 903
                         $referencedColumnName
@@ -909,13 +909,13 @@  discard block
 block discarded – undo
909 909
 
910 910
             foreach ($joinTable->getInverseJoinColumns() as $inverseJoinColumn) {
911 911
                 /** @var JoinColumnMetadata $inverseJoinColumn */
912
-                if (! $inverseJoinColumn->getReferencedColumnName()) {
912
+                if ( ! $inverseJoinColumn->getReferencedColumnName()) {
913 913
                     $inverseJoinColumn->setReferencedColumnName($this->namingStrategy->referenceColumnName());
914 914
                 }
915 915
 
916 916
                 $referencedColumnName = $inverseJoinColumn->getReferencedColumnName();
917 917
 
918
-                if (! $inverseJoinColumn->getColumnName()) {
918
+                if ( ! $inverseJoinColumn->getColumnName()) {
919 919
                     $columnName = $this->namingStrategy->joinKeyColumnName(
920 920
                         $property->getTargetEntity(),
921 921
                         $referencedColumnName
@@ -949,7 +949,7 @@  discard block
 block discarded – undo
949 949
             throw MappingException::singleIdNotAllowedOnCompositePrimaryKey($this->className);
950 950
         }
951 951
 
952
-        if (! isset($this->identifier[0])) {
952
+        if ( ! isset($this->identifier[0])) {
953 953
             throw MappingException::noIdDefined($this->className);
954 954
         }
955 955
 
@@ -1008,7 +1008,7 @@  discard block
 block discarded – undo
1008 1008
             // Association defined as Id field
1009 1009
             $targetClass = $em->getClassMetadata($property->getTargetEntity());
1010 1010
 
1011
-            if (! $property->isOwningSide()) {
1011
+            if ( ! $property->isOwningSide()) {
1012 1012
                 $property    = $targetClass->getProperty($property->getMappedBy());
1013 1013
                 $targetClass = $em->getClassMetadata($property->getTargetEntity());
1014 1014
             }
@@ -1023,7 +1023,7 @@  discard block
 block discarded – undo
1023 1023
                 $columnName           = $joinColumn->getColumnName();
1024 1024
                 $referencedColumnName = $joinColumn->getReferencedColumnName();
1025 1025
 
1026
-                if (! $joinColumn->getType()) {
1026
+                if ( ! $joinColumn->getType()) {
1027 1027
                     $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $em));
1028 1028
                 }
1029 1029
 
@@ -1057,11 +1057,11 @@  discard block
 block discarded – undo
1057 1057
     {
1058 1058
         $schema = $this->getSchemaName() === null
1059 1059
             ? ''
1060
-            : $this->getSchemaName() . '_'
1060
+            : $this->getSchemaName().'_'
1061 1061
         ;
1062 1062
 
1063 1063
         // replace dots with underscores because PostgreSQL creates temporary tables in a special schema
1064
-        return $schema . $this->getTableName() . '_id_tmp';
1064
+        return $schema.$this->getTableName().'_id_tmp';
1065 1065
     }
1066 1066
 
1067 1067
     /**
@@ -1095,7 +1095,7 @@  discard block
 block discarded – undo
1095 1095
      */
1096 1096
     public function setInheritanceType($type) : void
1097 1097
     {
1098
-        if (! $this->isInheritanceType($type)) {
1098
+        if ( ! $this->isInheritanceType($type)) {
1099 1099
             throw MappingException::invalidInheritanceType($this->className, $type);
1100 1100
         }
1101 1101
 
@@ -1113,7 +1113,7 @@  discard block
 block discarded – undo
1113 1113
     {
1114 1114
         $fieldName = $property->getName();
1115 1115
 
1116
-        if (! isset($this->declaredProperties[$fieldName])) {
1116
+        if ( ! isset($this->declaredProperties[$fieldName])) {
1117 1117
             throw MappingException::invalidOverrideFieldName($this->className, $fieldName);
1118 1118
         }
1119 1119
 
@@ -1310,7 +1310,7 @@  discard block
 block discarded – undo
1310 1310
         $declaringClass    = $property->getDeclaringClass();
1311 1311
 
1312 1312
         if ($inheritedProperty instanceof FieldMetadata) {
1313
-            if (! $declaringClass->isMappedSuperclass) {
1313
+            if ( ! $declaringClass->isMappedSuperclass) {
1314 1314
                 $inheritedProperty->setTableName($property->getTableName());
1315 1315
             }
1316 1316
 
@@ -1354,7 +1354,7 @@  discard block
 block discarded – undo
1354 1354
             throw MappingException::duplicateQueryMapping($this->className, $name);
1355 1355
         }
1356 1356
 
1357
-        if (! isset($queryMapping['resultClass']) && ! isset($queryMapping['resultSetMapping'])) {
1357
+        if ( ! isset($queryMapping['resultClass']) && ! isset($queryMapping['resultSetMapping'])) {
1358 1358
             throw MappingException::missingQueryMapping($this->className, $name);
1359 1359
         }
1360 1360
 
@@ -1371,7 +1371,7 @@  discard block
 block discarded – undo
1371 1371
      */
1372 1372
     public function addSqlResultSetMapping(array $resultMapping)
1373 1373
     {
1374
-        if (! isset($resultMapping['name'])) {
1374
+        if ( ! isset($resultMapping['name'])) {
1375 1375
             throw MappingException::nameIsMandatoryForSqlResultSetMapping($this->className);
1376 1376
         }
1377 1377
 
@@ -1381,7 +1381,7 @@  discard block
 block discarded – undo
1381 1381
 
1382 1382
         if (isset($resultMapping['entities'])) {
1383 1383
             foreach ($resultMapping['entities'] as $key => $entityResult) {
1384
-                if (! isset($entityResult['entityClass'])) {
1384
+                if ( ! isset($entityResult['entityClass'])) {
1385 1385
                     throw MappingException::missingResultSetMappingEntity($this->className, $resultMapping['name']);
1386 1386
                 }
1387 1387
 
@@ -1390,11 +1390,11 @@  discard block
 block discarded – undo
1390 1390
 
1391 1391
                 if (isset($entityResult['fields'])) {
1392 1392
                     foreach ($entityResult['fields'] as $k => $field) {
1393
-                        if (! isset($field['name'])) {
1393
+                        if ( ! isset($field['name'])) {
1394 1394
                             throw MappingException::missingResultSetMappingFieldName($this->className, $resultMapping['name']);
1395 1395
                         }
1396 1396
 
1397
-                        if (! isset($field['column'])) {
1397
+                        if ( ! isset($field['column'])) {
1398 1398
                             $fieldName = $field['name'];
1399 1399
 
1400 1400
                             if (strpos($fieldName, '.')) {
@@ -1492,11 +1492,11 @@  discard block
 block discarded – undo
1492 1492
             'method' => $method,
1493 1493
         ];
1494 1494
 
1495
-        if (! class_exists($class)) {
1495
+        if ( ! class_exists($class)) {
1496 1496
             throw MappingException::entityListenerClassNotFound($class, $this->className);
1497 1497
         }
1498 1498
 
1499
-        if (! method_exists($class, $method)) {
1499
+        if ( ! method_exists($class, $method)) {
1500 1500
             throw MappingException::entityListenerMethodNotFound($class, $method, $this->className);
1501 1501
         }
1502 1502
 
@@ -1563,7 +1563,7 @@  discard block
 block discarded – undo
1563 1563
             return;
1564 1564
         }
1565 1565
 
1566
-        if (! (class_exists($className) || interface_exists($className))) {
1566
+        if ( ! (class_exists($className) || interface_exists($className))) {
1567 1567
             throw MappingException::invalidClassInDiscriminatorMap($className, $this->className);
1568 1568
         }
1569 1569
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Driver/Annotation/AnnotationDriver.php 1 patch
Spacing   +36 added lines, -36 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\Mapping\Driver\Annotation;
6 6
 
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
             return $this->classNames;
178 178
         }
179 179
 
180
-        if (! $this->paths) {
180
+        if ( ! $this->paths) {
181 181
             throw Mapping\MappingException::pathRequired();
182 182
         }
183 183
 
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
         $includedFiles = [];
186 186
 
187 187
         foreach ($this->paths as $path) {
188
-            if (! is_dir($path)) {
188
+            if ( ! is_dir($path)) {
189 189
                 throw Mapping\MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path);
190 190
             }
191 191
 
@@ -194,14 +194,14 @@  discard block
 block discarded – undo
194 194
                     new \RecursiveDirectoryIterator($path, \FilesystemIterator::SKIP_DOTS),
195 195
                     \RecursiveIteratorIterator::LEAVES_ONLY
196 196
                 ),
197
-                '/^.+' . preg_quote($this->fileExtension) . '$/i',
197
+                '/^.+'.preg_quote($this->fileExtension).'$/i',
198 198
                 \RecursiveRegexIterator::GET_MATCH
199 199
             );
200 200
 
201 201
             foreach ($iterator as $file) {
202 202
                 $sourceFile = $file[0];
203 203
 
204
-                if (! preg_match('(^phar:)i', $sourceFile)) {
204
+                if ( ! preg_match('(^phar:)i', $sourceFile)) {
205 205
                     $sourceFile = realpath($sourceFile);
206 206
                 }
207 207
 
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
     ) : Mapping\ClassMetadata {
250 250
         $reflectionClass = $metadata->getReflectionClass();
251 251
 
252
-        if (! $reflectionClass) {
252
+        if ( ! $reflectionClass) {
253 253
             // this happens when running annotation driver in combination with
254 254
             // static reflection services. This is not the nicest fix
255 255
             $reflectionClass = new \ReflectionClass($metadata->getClassName());
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
                 $metadataBuildingContext
287 287
             );
288 288
 
289
-            if (! $property) {
289
+            if ( ! $property) {
290 290
                 continue;
291 291
             }
292 292
 
@@ -585,11 +585,11 @@  discard block
 block discarded – undo
585 585
         $assocMetadata->setOrphanRemoval($oneToOneAnnot->orphanRemoval);
586 586
         $assocMetadata->setFetchMode($this->getFetchMode($className, $oneToOneAnnot->fetch));
587 587
 
588
-        if (! empty($oneToOneAnnot->mappedBy)) {
588
+        if ( ! empty($oneToOneAnnot->mappedBy)) {
589 589
             $assocMetadata->setMappedBy($oneToOneAnnot->mappedBy);
590 590
         }
591 591
 
592
-        if (! empty($oneToOneAnnot->inversedBy)) {
592
+        if ( ! empty($oneToOneAnnot->inversedBy)) {
593 593
             $assocMetadata->setInversedBy($oneToOneAnnot->inversedBy);
594 594
         }
595 595
 
@@ -647,7 +647,7 @@  discard block
 block discarded – undo
647 647
         $assocMetadata->setCascade($this->getCascade($className, $fieldName, $manyToOneAnnot->cascade));
648 648
         $assocMetadata->setFetchMode($this->getFetchMode($className, $manyToOneAnnot->fetch));
649 649
 
650
-        if (! empty($manyToOneAnnot->inversedBy)) {
650
+        if ( ! empty($manyToOneAnnot->inversedBy)) {
651 651
             $assocMetadata->setInversedBy($manyToOneAnnot->inversedBy);
652 652
         }
653 653
 
@@ -706,11 +706,11 @@  discard block
 block discarded – undo
706 706
         $assocMetadata->setOrphanRemoval($oneToManyAnnot->orphanRemoval);
707 707
         $assocMetadata->setFetchMode($this->getFetchMode($className, $oneToManyAnnot->fetch));
708 708
 
709
-        if (! empty($oneToManyAnnot->mappedBy)) {
709
+        if ( ! empty($oneToManyAnnot->mappedBy)) {
710 710
             $assocMetadata->setMappedBy($oneToManyAnnot->mappedBy);
711 711
         }
712 712
 
713
-        if (! empty($oneToManyAnnot->indexBy)) {
713
+        if ( ! empty($oneToManyAnnot->indexBy)) {
714 714
             $assocMetadata->setIndexedBy($oneToManyAnnot->indexBy);
715 715
         }
716 716
 
@@ -753,15 +753,15 @@  discard block
 block discarded – undo
753 753
         $assocMetadata->setOrphanRemoval($manyToManyAnnot->orphanRemoval);
754 754
         $assocMetadata->setFetchMode($this->getFetchMode($className, $manyToManyAnnot->fetch));
755 755
 
756
-        if (! empty($manyToManyAnnot->mappedBy)) {
756
+        if ( ! empty($manyToManyAnnot->mappedBy)) {
757 757
             $assocMetadata->setMappedBy($manyToManyAnnot->mappedBy);
758 758
         }
759 759
 
760
-        if (! empty($manyToManyAnnot->inversedBy)) {
760
+        if ( ! empty($manyToManyAnnot->inversedBy)) {
761 761
             $assocMetadata->setInversedBy($manyToManyAnnot->inversedBy);
762 762
         }
763 763
 
764
-        if (! empty($manyToManyAnnot->indexBy)) {
764
+        if ( ! empty($manyToManyAnnot->indexBy)) {
765 765
             $assocMetadata->setIndexedBy($manyToManyAnnot->indexBy);
766 766
         }
767 767
 
@@ -805,15 +805,15 @@  discard block
 block discarded – undo
805 805
 
806 806
         $fieldMetadata->setType(Type::getType($columnAnnot->type));
807 807
 
808
-        if (! empty($columnAnnot->name)) {
808
+        if ( ! empty($columnAnnot->name)) {
809 809
             $fieldMetadata->setColumnName($columnAnnot->name);
810 810
         }
811 811
 
812
-        if (! empty($columnAnnot->columnDefinition)) {
812
+        if ( ! empty($columnAnnot->columnDefinition)) {
813 813
             $fieldMetadata->setColumnDefinition($columnAnnot->columnDefinition);
814 814
         }
815 815
 
816
-        if (! empty($columnAnnot->length)) {
816
+        if ( ! empty($columnAnnot->length)) {
817 817
             $fieldMetadata->setLength($columnAnnot->length);
818 818
         }
819 819
 
@@ -836,11 +836,11 @@  discard block
 block discarded – undo
836 836
         Annotation\Table $tableAnnot,
837 837
         Mapping\TableMetadata $table
838 838
     ) : Mapping\TableMetadata {
839
-        if (! empty($tableAnnot->name)) {
839
+        if ( ! empty($tableAnnot->name)) {
840 840
             $table->setName($tableAnnot->name);
841 841
         }
842 842
 
843
-        if (! empty($tableAnnot->schema)) {
843
+        if ( ! empty($tableAnnot->schema)) {
844 844
             $table->setSchema($tableAnnot->schema);
845 845
         }
846 846
 
@@ -878,11 +878,11 @@  discard block
 block discarded – undo
878 878
     ) : Mapping\JoinTableMetadata {
879 879
         $joinTable = new Mapping\JoinTableMetadata();
880 880
 
881
-        if (! empty($joinTableAnnot->name)) {
881
+        if ( ! empty($joinTableAnnot->name)) {
882 882
             $joinTable->setName($joinTableAnnot->name);
883 883
         }
884 884
 
885
-        if (! empty($joinTableAnnot->schema)) {
885
+        if ( ! empty($joinTableAnnot->schema)) {
886 886
             $joinTable->setSchema($joinTableAnnot->schema);
887 887
         }
888 888
 
@@ -910,22 +910,22 @@  discard block
 block discarded – undo
910 910
         $joinColumn = new Mapping\JoinColumnMetadata();
911 911
 
912 912
         // @todo Remove conditionals for name and referencedColumnName once naming strategy is brought into drivers
913
-        if (! empty($joinColumnAnnot->name)) {
913
+        if ( ! empty($joinColumnAnnot->name)) {
914 914
             $joinColumn->setColumnName($joinColumnAnnot->name);
915 915
         }
916 916
 
917
-        if (! empty($joinColumnAnnot->referencedColumnName)) {
917
+        if ( ! empty($joinColumnAnnot->referencedColumnName)) {
918 918
             $joinColumn->setReferencedColumnName($joinColumnAnnot->referencedColumnName);
919 919
         }
920 920
 
921 921
         $joinColumn->setNullable($joinColumnAnnot->nullable);
922 922
         $joinColumn->setUnique($joinColumnAnnot->unique);
923 923
 
924
-        if (! empty($joinColumnAnnot->fieldName)) {
924
+        if ( ! empty($joinColumnAnnot->fieldName)) {
925 925
             $joinColumn->setAliasedName($joinColumnAnnot->fieldName);
926 926
         }
927 927
 
928
-        if (! empty($joinColumnAnnot->columnDefinition)) {
928
+        if ( ! empty($joinColumnAnnot->columnDefinition)) {
929 929
             $joinColumn->setColumnDefinition($joinColumnAnnot->columnDefinition);
930 930
         }
931 931
 
@@ -947,7 +947,7 @@  discard block
 block discarded – undo
947 947
         $fieldName = null
948 948
     ) : Mapping\CacheMetadata {
949 949
         $baseRegion    = strtolower(str_replace('\\', '_', $metadata->getRootClassName()));
950
-        $defaultRegion = $baseRegion . ($fieldName ? '__' . $fieldName : '');
950
+        $defaultRegion = $baseRegion.($fieldName ? '__'.$fieldName : '');
951 951
 
952 952
         $usage  = constant(sprintf('%s::%s', Mapping\CacheUsage::class, $cacheAnnot->usage));
953 953
         $region = $cacheAnnot->region ?: $defaultRegion;
@@ -1055,11 +1055,11 @@  discard block
 block discarded – undo
1055 1055
             $discriminatorColumn->setType(Type::getType($typeName));
1056 1056
             $discriminatorColumn->setColumnName($discriminatorColumnAnnotation->name);
1057 1057
 
1058
-            if (! empty($discriminatorColumnAnnotation->columnDefinition)) {
1058
+            if ( ! empty($discriminatorColumnAnnotation->columnDefinition)) {
1059 1059
                 $discriminatorColumn->setColumnDefinition($discriminatorColumnAnnotation->columnDefinition);
1060 1060
             }
1061 1061
 
1062
-            if (! empty($discriminatorColumnAnnotation->length)) {
1062
+            if ( ! empty($discriminatorColumnAnnotation->length)) {
1063 1063
                 $discriminatorColumn->setLength($discriminatorColumnAnnotation->length);
1064 1064
             }
1065 1065
         }
@@ -1147,7 +1147,7 @@  discard block
 block discarded – undo
1147 1147
             $entityListenersAnnot = $classAnnotations[Annotation\EntityListeners::class];
1148 1148
 
1149 1149
             foreach ($entityListenersAnnot->value as $listenerClassName) {
1150
-                if (! class_exists($listenerClassName)) {
1150
+                if ( ! class_exists($listenerClassName)) {
1151 1151
                     throw Mapping\MappingException::entityListenerClassNotFound(
1152 1152
                         $listenerClassName,
1153 1153
                         $metadata->getClassName()
@@ -1185,7 +1185,7 @@  discard block
 block discarded – undo
1185 1185
                 $fieldName = $associationOverride->name;
1186 1186
                 $property  = $metadata->getProperty($fieldName);
1187 1187
 
1188
-                if (! $property) {
1188
+                if ( ! $property) {
1189 1189
                     throw Mapping\MappingException::invalidOverrideFieldName($metadata->getClassName(), $fieldName);
1190 1190
                 }
1191 1191
 
@@ -1219,7 +1219,7 @@  discard block
 block discarded – undo
1219 1219
                 // Check for fetch
1220 1220
                 if ($associationOverride->fetch) {
1221 1221
                     $override->setFetchMode(
1222
-                        constant(Mapping\FetchMode::class . '::' . $associationOverride->fetch)
1222
+                        constant(Mapping\FetchMode::class.'::'.$associationOverride->fetch)
1223 1223
                     );
1224 1224
                 }
1225 1225
 
@@ -1308,7 +1308,7 @@  discard block
 block discarded – undo
1308 1308
     {
1309 1309
         $fetchModeConstant = sprintf('%s::%s', Mapping\FetchMode::class, $fetchMode);
1310 1310
 
1311
-        if (! defined($fetchModeConstant)) {
1311
+        if ( ! defined($fetchModeConstant)) {
1312 1312
             throw Mapping\MappingException::invalidFetchMode($className, $fetchMode);
1313 1313
         }
1314 1314
 
@@ -1354,7 +1354,7 @@  discard block
 block discarded – undo
1354 1354
         $classAnnotations = $this->reader->getClassAnnotations($reflectionClass);
1355 1355
 
1356 1356
         foreach ($classAnnotations as $key => $annot) {
1357
-            if (! is_numeric($key)) {
1357
+            if ( ! is_numeric($key)) {
1358 1358
                 continue;
1359 1359
             }
1360 1360
 
@@ -1372,7 +1372,7 @@  discard block
 block discarded – undo
1372 1372
         $propertyAnnotations = $this->reader->getPropertyAnnotations($reflectionProperty);
1373 1373
 
1374 1374
         foreach ($propertyAnnotations as $key => $annot) {
1375
-            if (! is_numeric($key)) {
1375
+            if ( ! is_numeric($key)) {
1376 1376
                 continue;
1377 1377
             }
1378 1378
 
@@ -1390,7 +1390,7 @@  discard block
 block discarded – undo
1390 1390
         $methodAnnotations = $this->reader->getMethodAnnotations($reflectionMethod);
1391 1391
 
1392 1392
         foreach ($methodAnnotations as $key => $annot) {
1393
-            if (! is_numeric($key)) {
1393
+            if ( ! is_numeric($key)) {
1394 1394
                 continue;
1395 1395
             }
1396 1396
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Driver/NewAnnotationDriver.php 1 patch
Spacing   +28 added lines, -28 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\Mapping\Driver;
6 6
 
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 
123 123
         $classNames = array_filter(
124 124
             $this->locator->getAllClassNames(null),
125
-            function ($className) {
125
+            function($className) {
126 126
                 return ! $this->isTransient($className);
127 127
             }
128 128
         );
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
             $entityListenersAnnot = $classAnnotations[Annotation\EntityListeners::class];
270 270
 
271 271
             foreach ($entityListenersAnnot->value as $listenerClassName) {
272
-                if (! class_exists($listenerClassName)) {
272
+                if ( ! class_exists($listenerClassName)) {
273 273
                     throw Mapping\MappingException::entityListenerClassNotFound(
274 274
                         $listenerClassName,
275 275
                         $reflectionClass->getName()
@@ -316,15 +316,15 @@  discard block
 block discarded – undo
316 316
 
317 317
                     $discriminatorColumn->setColumnName($discriminatorColumnAnnot->name);
318 318
 
319
-                    if (! empty($discriminatorColumnAnnot->columnDefinition)) {
319
+                    if ( ! empty($discriminatorColumnAnnot->columnDefinition)) {
320 320
                         $discriminatorColumn->setColumnDefinition($discriminatorColumnAnnot->columnDefinition);
321 321
                     }
322 322
 
323
-                    if (! empty($discriminatorColumnAnnot->type)) {
323
+                    if ( ! empty($discriminatorColumnAnnot->type)) {
324 324
                         $discriminatorColumn->setType(Type::getType($discriminatorColumnAnnot->type));
325 325
                     }
326 326
 
327
-                    if (! empty($discriminatorColumnAnnot->length)) {
327
+                    if ( ! empty($discriminatorColumnAnnot->length)) {
328 328
                         $discriminatorColumn->setLength($discriminatorColumnAnnot->length);
329 329
                     }
330 330
                 }
@@ -379,11 +379,11 @@  discard block
 block discarded – undo
379 379
     {
380 380
         $table = new Mapping\TableMetadata();
381 381
 
382
-        if (! empty($tableAnnot->name)) {
382
+        if ( ! empty($tableAnnot->name)) {
383 383
             $table->setName($tableAnnot->name);
384 384
         }
385 385
 
386
-        if (! empty($tableAnnot->schema)) {
386
+        if ( ! empty($tableAnnot->schema)) {
387 387
             $table->setSchema($tableAnnot->schema);
388 388
         }
389 389
 
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
     ) {
467 467
         $usage         = constant(sprintf('%s::%s', Mapping\CacheUsage::class, $cacheAnnot->usage));
468 468
         $baseRegion    = strtolower(str_replace('\\', '_', $metadata->getRootClassName()));
469
-        $defaultRegion = $baseRegion . ($fieldName ? '__' . $fieldName : '');
469
+        $defaultRegion = $baseRegion.($fieldName ? '__'.$fieldName : '');
470 470
 
471 471
         return new Mapping\CacheMetadata($usage, $cacheAnnot->region ?: $defaultRegion);
472 472
     }
@@ -582,11 +582,11 @@  discard block
 block discarded – undo
582 582
             $fieldMetadata->setPrimaryKey(true);
583 583
         }
584 584
 
585
-        if (! empty($columnAnnot->columnDefinition)) {
585
+        if ( ! empty($columnAnnot->columnDefinition)) {
586 586
             $fieldMetadata->setColumnDefinition($columnAnnot->columnDefinition);
587 587
         }
588 588
 
589
-        if (! empty($columnAnnot->length)) {
589
+        if ( ! empty($columnAnnot->length)) {
590 590
             $fieldMetadata->setLength($columnAnnot->length);
591 591
         }
592 592
 
@@ -607,7 +607,7 @@  discard block
 block discarded – undo
607 607
                     break;
608 608
 
609 609
                 default:
610
-                    if (! isset($customOptions['default'])) {
610
+                    if ( ! isset($customOptions['default'])) {
611 611
                         throw Mapping\MappingException::unsupportedOptimisticLockingType($fieldMetadata->getType());
612 612
                     }
613 613
             }
@@ -645,11 +645,11 @@  discard block
 block discarded – undo
645 645
         $assocMetadata->setOrphanRemoval($oneToOneAnnot->orphanRemoval);
646 646
         $assocMetadata->setFetchMode($this->getFetchMode($className, $oneToOneAnnot->fetch));
647 647
 
648
-        if (! empty($oneToOneAnnot->mappedBy)) {
648
+        if ( ! empty($oneToOneAnnot->mappedBy)) {
649 649
             $assocMetadata->setMappedBy($oneToOneAnnot->mappedBy);
650 650
         }
651 651
 
652
-        if (! empty($oneToOneAnnot->inversedBy)) {
652
+        if ( ! empty($oneToOneAnnot->inversedBy)) {
653 653
             $assocMetadata->setInversedBy($oneToOneAnnot->inversedBy);
654 654
         }
655 655
 
@@ -725,7 +725,7 @@  discard block
 block discarded – undo
725 725
         $assocMetadata->setCascade($this->getCascade($className, $fieldName, $manyToOneAnnot->cascade));
726 726
         $assocMetadata->setFetchMode($this->getFetchMode($className, $manyToOneAnnot->fetch));
727 727
 
728
-        if (! empty($manyToOneAnnot->inversedBy)) {
728
+        if ( ! empty($manyToOneAnnot->inversedBy)) {
729 729
             $assocMetadata->setInversedBy($manyToOneAnnot->inversedBy);
730 730
         }
731 731
 
@@ -802,11 +802,11 @@  discard block
 block discarded – undo
802 802
         $assocMetadata->setOrphanRemoval($oneToManyAnnot->orphanRemoval);
803 803
         $assocMetadata->setFetchMode($this->getFetchMode($className, $oneToManyAnnot->fetch));
804 804
 
805
-        if (! empty($oneToManyAnnot->mappedBy)) {
805
+        if ( ! empty($oneToManyAnnot->mappedBy)) {
806 806
             $assocMetadata->setMappedBy($oneToManyAnnot->mappedBy);
807 807
         }
808 808
 
809
-        if (! empty($oneToManyAnnot->indexBy)) {
809
+        if ( ! empty($oneToManyAnnot->indexBy)) {
810 810
             $assocMetadata->setIndexedBy($oneToManyAnnot->indexBy);
811 811
         }
812 812
 
@@ -860,15 +860,15 @@  discard block
 block discarded – undo
860 860
         $assocMetadata->setOrphanRemoval($manyToManyAnnot->orphanRemoval);
861 861
         $assocMetadata->setFetchMode($this->getFetchMode($className, $manyToManyAnnot->fetch));
862 862
 
863
-        if (! empty($manyToManyAnnot->mappedBy)) {
863
+        if ( ! empty($manyToManyAnnot->mappedBy)) {
864 864
             $assocMetadata->setMappedBy($manyToManyAnnot->mappedBy);
865 865
         }
866 866
 
867
-        if (! empty($manyToManyAnnot->inversedBy)) {
867
+        if ( ! empty($manyToManyAnnot->inversedBy)) {
868 868
             $assocMetadata->setInversedBy($manyToManyAnnot->inversedBy);
869 869
         }
870 870
 
871
-        if (! empty($manyToManyAnnot->indexBy)) {
871
+        if ( ! empty($manyToManyAnnot->indexBy)) {
872 872
             $assocMetadata->setIndexedBy($manyToManyAnnot->indexBy);
873 873
         }
874 874
 
@@ -919,11 +919,11 @@  discard block
 block discarded – undo
919 919
     ) {
920 920
         $joinTable = new Mapping\JoinTableMetadata();
921 921
 
922
-        if (! empty($joinTableAnnot->name)) {
922
+        if ( ! empty($joinTableAnnot->name)) {
923 923
             $joinTable->setName($joinTableAnnot->name);
924 924
         }
925 925
 
926
-        if (! empty($joinTableAnnot->schema)) {
926
+        if ( ! empty($joinTableAnnot->schema)) {
927 927
             $joinTable->setSchema($joinTableAnnot->schema);
928 928
         }
929 929
 
@@ -976,11 +976,11 @@  discard block
 block discarded – undo
976 976
         $joinColumn->setNullable($joinColumnAnnot->nullable);
977 977
         $joinColumn->setUnique($joinColumnAnnot->unique);
978 978
 
979
-        if (! empty($joinColumnAnnot->fieldName)) {
979
+        if ( ! empty($joinColumnAnnot->fieldName)) {
980 980
             $joinColumn->setAliasedName($joinColumnAnnot->fieldName);
981 981
         }
982 982
 
983
-        if (! empty($joinColumnAnnot->columnDefinition)) {
983
+        if ( ! empty($joinColumnAnnot->columnDefinition)) {
984 984
             $joinColumn->setColumnDefinition($joinColumnAnnot->columnDefinition);
985 985
         }
986 986
 
@@ -1036,7 +1036,7 @@  discard block
 block discarded – undo
1036 1036
     {
1037 1037
         $fetchModeConstant = sprintf('%s::%s', Mapping\FetchMode::class, $fetchMode);
1038 1038
 
1039
-        if (! defined($fetchModeConstant)) {
1039
+        if ( ! defined($fetchModeConstant)) {
1040 1040
             throw Mapping\MappingException::invalidFetchMode($className, $fetchMode);
1041 1041
         }
1042 1042
 
@@ -1078,7 +1078,7 @@  discard block
 block discarded – undo
1078 1078
         $classAnnotations = $this->reader->getClassAnnotations($reflectionClass);
1079 1079
 
1080 1080
         foreach ($classAnnotations as $key => $annot) {
1081
-            if (! is_numeric($key)) {
1081
+            if ( ! is_numeric($key)) {
1082 1082
                 continue;
1083 1083
             }
1084 1084
 
@@ -1097,7 +1097,7 @@  discard block
 block discarded – undo
1097 1097
         $propertyAnnotations = $this->reader->getPropertyAnnotations($reflectionProperty);
1098 1098
 
1099 1099
         foreach ($propertyAnnotations as $key => $annot) {
1100
-            if (! is_numeric($key)) {
1100
+            if ( ! is_numeric($key)) {
1101 1101
                 continue;
1102 1102
             }
1103 1103
 
@@ -1116,7 +1116,7 @@  discard block
 block discarded – undo
1116 1116
         $methodAnnotations = $this->reader->getMethodAnnotations($reflectionMethod);
1117 1117
 
1118 1118
         foreach ($methodAnnotations as $key => $annot) {
1119
-            if (! is_numeric($key)) {
1119
+            if ( ! is_numeric($key)) {
1120 1120
                 continue;
1121 1121
             }
1122 1122
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php 1 patch
Spacing   +37 added lines, -37 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\Mapping\Driver;
6 6
 
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
             return $this->classNames;
179 179
         }
180 180
 
181
-        if (! $this->paths) {
181
+        if ( ! $this->paths) {
182 182
             throw Mapping\MappingException::pathRequired();
183 183
         }
184 184
 
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
         $includedFiles = [];
187 187
 
188 188
         foreach ($this->paths as $path) {
189
-            if (! is_dir($path)) {
189
+            if ( ! is_dir($path)) {
190 190
                 throw Mapping\MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path);
191 191
             }
192 192
 
@@ -195,14 +195,14 @@  discard block
 block discarded – undo
195 195
                     new \RecursiveDirectoryIterator($path, \FilesystemIterator::SKIP_DOTS),
196 196
                     \RecursiveIteratorIterator::LEAVES_ONLY
197 197
                 ),
198
-                '/^.+' . preg_quote($this->fileExtension) . '$/i',
198
+                '/^.+'.preg_quote($this->fileExtension).'$/i',
199 199
                 \RecursiveRegexIterator::GET_MATCH
200 200
             );
201 201
 
202 202
             foreach ($iterator as $file) {
203 203
                 $sourceFile = $file[0];
204 204
 
205
-                if (! preg_match('(^phar:)i', $sourceFile)) {
205
+                if ( ! preg_match('(^phar:)i', $sourceFile)) {
206 206
                     $sourceFile = realpath($sourceFile);
207 207
                 }
208 208
 
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
     ) : Mapping\ClassMetadata {
247 247
         $reflectionClass = $metadata->getReflectionClass();
248 248
 
249
-        if (! $reflectionClass) {
249
+        if ( ! $reflectionClass) {
250 250
             // this happens when running annotation driver in combination with
251 251
             // static reflection services. This is not the nicest fix
252 252
             $reflectionClass = new \ReflectionClass($metadata->getClassName());
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
                 $classMetadata
283 283
             );
284 284
 
285
-            if (! $property) {
285
+            if ( ! $property) {
286 286
                 continue;
287 287
             }
288 288
 
@@ -577,11 +577,11 @@  discard block
 block discarded – undo
577 577
         $assocMetadata->setOrphanRemoval($oneToOneAnnot->orphanRemoval);
578 578
         $assocMetadata->setFetchMode($this->getFetchMode($className, $oneToOneAnnot->fetch));
579 579
 
580
-        if (! empty($oneToOneAnnot->mappedBy)) {
580
+        if ( ! empty($oneToOneAnnot->mappedBy)) {
581 581
             $assocMetadata->setMappedBy($oneToOneAnnot->mappedBy);
582 582
         }
583 583
 
584
-        if (! empty($oneToOneAnnot->inversedBy)) {
584
+        if ( ! empty($oneToOneAnnot->inversedBy)) {
585 585
             $assocMetadata->setInversedBy($oneToOneAnnot->inversedBy);
586 586
         }
587 587
 
@@ -638,7 +638,7 @@  discard block
 block discarded – undo
638 638
         $assocMetadata->setCascade($this->getCascade($className, $fieldName, $manyToOneAnnot->cascade));
639 639
         $assocMetadata->setFetchMode($this->getFetchMode($className, $manyToOneAnnot->fetch));
640 640
 
641
-        if (! empty($manyToOneAnnot->inversedBy)) {
641
+        if ( ! empty($manyToOneAnnot->inversedBy)) {
642 642
             $assocMetadata->setInversedBy($manyToOneAnnot->inversedBy);
643 643
         }
644 644
 
@@ -696,11 +696,11 @@  discard block
 block discarded – undo
696 696
         $assocMetadata->setOrphanRemoval($oneToManyAnnot->orphanRemoval);
697 697
         $assocMetadata->setFetchMode($this->getFetchMode($className, $oneToManyAnnot->fetch));
698 698
 
699
-        if (! empty($oneToManyAnnot->mappedBy)) {
699
+        if ( ! empty($oneToManyAnnot->mappedBy)) {
700 700
             $assocMetadata->setMappedBy($oneToManyAnnot->mappedBy);
701 701
         }
702 702
 
703
-        if (! empty($oneToManyAnnot->indexBy)) {
703
+        if ( ! empty($oneToManyAnnot->indexBy)) {
704 704
             $assocMetadata->setIndexedBy($oneToManyAnnot->indexBy);
705 705
         }
706 706
 
@@ -742,15 +742,15 @@  discard block
 block discarded – undo
742 742
         $assocMetadata->setOrphanRemoval($manyToManyAnnot->orphanRemoval);
743 743
         $assocMetadata->setFetchMode($this->getFetchMode($className, $manyToManyAnnot->fetch));
744 744
 
745
-        if (! empty($manyToManyAnnot->mappedBy)) {
745
+        if ( ! empty($manyToManyAnnot->mappedBy)) {
746 746
             $assocMetadata->setMappedBy($manyToManyAnnot->mappedBy);
747 747
         }
748 748
 
749
-        if (! empty($manyToManyAnnot->inversedBy)) {
749
+        if ( ! empty($manyToManyAnnot->inversedBy)) {
750 750
             $assocMetadata->setInversedBy($manyToManyAnnot->inversedBy);
751 751
         }
752 752
 
753
-        if (! empty($manyToManyAnnot->indexBy)) {
753
+        if ( ! empty($manyToManyAnnot->indexBy)) {
754 754
             $assocMetadata->setIndexedBy($manyToManyAnnot->indexBy);
755 755
         }
756 756
 
@@ -794,15 +794,15 @@  discard block
 block discarded – undo
794 794
 
795 795
         $fieldMetadata->setType(Type::getType($columnAnnot->type));
796 796
 
797
-        if (! empty($columnAnnot->name)) {
797
+        if ( ! empty($columnAnnot->name)) {
798 798
             $fieldMetadata->setColumnName($columnAnnot->name);
799 799
         }
800 800
 
801
-        if (! empty($columnAnnot->columnDefinition)) {
801
+        if ( ! empty($columnAnnot->columnDefinition)) {
802 802
             $fieldMetadata->setColumnDefinition($columnAnnot->columnDefinition);
803 803
         }
804 804
 
805
-        if (! empty($columnAnnot->length)) {
805
+        if ( ! empty($columnAnnot->length)) {
806 806
             $fieldMetadata->setLength($columnAnnot->length);
807 807
         }
808 808
 
@@ -825,11 +825,11 @@  discard block
 block discarded – undo
825 825
         Annotation\Table $tableAnnot,
826 826
         Mapping\TableMetadata $tableMetadata
827 827
     ) : void {
828
-        if (! empty($tableAnnot->name)) {
828
+        if ( ! empty($tableAnnot->name)) {
829 829
             $tableMetadata->setName($tableAnnot->name);
830 830
         }
831 831
 
832
-        if (! empty($tableAnnot->schema)) {
832
+        if ( ! empty($tableAnnot->schema)) {
833 833
             $tableMetadata->setSchema($tableAnnot->schema);
834 834
         }
835 835
 
@@ -865,11 +865,11 @@  discard block
 block discarded – undo
865 865
     ) : Mapping\JoinTableMetadata {
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
 
@@ -897,22 +897,22 @@  discard block
 block discarded – undo
897 897
         $joinColumn = new Mapping\JoinColumnMetadata();
898 898
 
899 899
         // @todo Remove conditionals for name and referencedColumnName once naming strategy is brought into drivers
900
-        if (! empty($joinColumnAnnot->name)) {
900
+        if ( ! empty($joinColumnAnnot->name)) {
901 901
             $joinColumn->setColumnName($joinColumnAnnot->name);
902 902
         }
903 903
 
904
-        if (! empty($joinColumnAnnot->referencedColumnName)) {
904
+        if ( ! empty($joinColumnAnnot->referencedColumnName)) {
905 905
             $joinColumn->setReferencedColumnName($joinColumnAnnot->referencedColumnName);
906 906
         }
907 907
 
908 908
         $joinColumn->setNullable($joinColumnAnnot->nullable);
909 909
         $joinColumn->setUnique($joinColumnAnnot->unique);
910 910
 
911
-        if (! empty($joinColumnAnnot->fieldName)) {
911
+        if ( ! empty($joinColumnAnnot->fieldName)) {
912 912
             $joinColumn->setAliasedName($joinColumnAnnot->fieldName);
913 913
         }
914 914
 
915
-        if (! empty($joinColumnAnnot->columnDefinition)) {
915
+        if ( ! empty($joinColumnAnnot->columnDefinition)) {
916 916
             $joinColumn->setColumnDefinition($joinColumnAnnot->columnDefinition);
917 917
         }
918 918
 
@@ -934,7 +934,7 @@  discard block
 block discarded – undo
934 934
         $fieldName = null
935 935
     ) : Mapping\CacheMetadata {
936 936
         $baseRegion    = strtolower(str_replace('\\', '_', $metadata->getRootClassName()));
937
-        $defaultRegion = $baseRegion . ($fieldName ? '__' . $fieldName : '');
937
+        $defaultRegion = $baseRegion.($fieldName ? '__'.$fieldName : '');
938 938
 
939 939
         $usage  = constant(sprintf('%s::%s', Mapping\CacheUsage::class, $cacheAnnot->usage));
940 940
         $region = $cacheAnnot->region ?: $defaultRegion;
@@ -995,7 +995,7 @@  discard block
 block discarded – undo
995 995
         if ($parent && $parent->inheritanceType === Mapping\InheritanceType::SINGLE_TABLE) {
996 996
             // Handle the case where a middle mapped super class inherits from a single table inheritance tree.
997 997
             do {
998
-                if (! $parent->isMappedSuperclass) {
998
+                if ( ! $parent->isMappedSuperclass) {
999 999
                     $metadata->setTable($parent->table);
1000 1000
 
1001 1001
                     break;
@@ -1050,11 +1050,11 @@  discard block
 block discarded – undo
1050 1050
             $discriminatorColumn->setType(Type::getType($typeName));
1051 1051
             $discriminatorColumn->setColumnName($discriminatorColumnAnnotation->name);
1052 1052
 
1053
-            if (! empty($discriminatorColumnAnnotation->columnDefinition)) {
1053
+            if ( ! empty($discriminatorColumnAnnotation->columnDefinition)) {
1054 1054
                 $discriminatorColumn->setColumnDefinition($discriminatorColumnAnnotation->columnDefinition);
1055 1055
             }
1056 1056
 
1057
-            if (! empty($discriminatorColumnAnnotation->length)) {
1057
+            if ( ! empty($discriminatorColumnAnnotation->length)) {
1058 1058
                 $discriminatorColumn->setLength($discriminatorColumnAnnotation->length);
1059 1059
             }
1060 1060
         }
@@ -1142,7 +1142,7 @@  discard block
 block discarded – undo
1142 1142
             $entityListenersAnnot = $classAnnotations[Annotation\EntityListeners::class];
1143 1143
 
1144 1144
             foreach ($entityListenersAnnot->value as $listenerClassName) {
1145
-                if (! class_exists($listenerClassName)) {
1145
+                if ( ! class_exists($listenerClassName)) {
1146 1146
                     throw Mapping\MappingException::entityListenerClassNotFound(
1147 1147
                         $listenerClassName,
1148 1148
                         $metadata->getClassName()
@@ -1179,7 +1179,7 @@  discard block
 block discarded – undo
1179 1179
                 $fieldName = $associationOverride->name;
1180 1180
                 $property  = $metadata->getProperty($fieldName);
1181 1181
 
1182
-                if (! $property) {
1182
+                if ( ! $property) {
1183 1183
                     throw Mapping\MappingException::invalidOverrideFieldName($metadata->getClassName(), $fieldName);
1184 1184
                 }
1185 1185
 
@@ -1213,7 +1213,7 @@  discard block
 block discarded – undo
1213 1213
                 // Check for fetch
1214 1214
                 if ($associationOverride->fetch) {
1215 1215
                     $override->setFetchMode(
1216
-                        constant(Mapping\FetchMode::class . '::' . $associationOverride->fetch)
1216
+                        constant(Mapping\FetchMode::class.'::'.$associationOverride->fetch)
1217 1217
                     );
1218 1218
                 }
1219 1219
 
@@ -1302,7 +1302,7 @@  discard block
 block discarded – undo
1302 1302
     {
1303 1303
         $fetchModeConstant = sprintf('%s::%s', Mapping\FetchMode::class, $fetchMode);
1304 1304
 
1305
-        if (! defined($fetchModeConstant)) {
1305
+        if ( ! defined($fetchModeConstant)) {
1306 1306
             throw Mapping\MappingException::invalidFetchMode($className, $fetchMode);
1307 1307
         }
1308 1308
 
@@ -1348,7 +1348,7 @@  discard block
 block discarded – undo
1348 1348
         $classAnnotations = $this->reader->getClassAnnotations($reflectionClass);
1349 1349
 
1350 1350
         foreach ($classAnnotations as $key => $annot) {
1351
-            if (! is_numeric($key)) {
1351
+            if ( ! is_numeric($key)) {
1352 1352
                 continue;
1353 1353
             }
1354 1354
 
@@ -1366,7 +1366,7 @@  discard block
 block discarded – undo
1366 1366
         $propertyAnnotations = $this->reader->getPropertyAnnotations($reflectionProperty);
1367 1367
 
1368 1368
         foreach ($propertyAnnotations as $key => $annot) {
1369
-            if (! is_numeric($key)) {
1369
+            if ( ! is_numeric($key)) {
1370 1370
                 continue;
1371 1371
             }
1372 1372
 
@@ -1384,7 +1384,7 @@  discard block
 block discarded – undo
1384 1384
         $methodAnnotations = $this->reader->getMethodAnnotations($reflectionMethod);
1385 1385
 
1386 1386
         foreach ($methodAnnotations as $key => $annot) {
1387
-            if (! is_numeric($key)) {
1387
+            if ( ! is_numeric($key)) {
1388 1388
                 continue;
1389 1389
             }
1390 1390
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/EntityClassMetadata.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Mapping;
6 6
 
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
      */
230 230
     public function getNamedNativeQuery($queryName) : array
231 231
     {
232
-        if (! isset($this->namedNativeQueries[$queryName])) {
232
+        if ( ! isset($this->namedNativeQueries[$queryName])) {
233 233
             throw MappingException::queryNotFound($this->entityName, $queryName);
234 234
         }
235 235
 
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
      */
260 260
     public function getSqlResultSetMapping($name) : array
261 261
     {
262
-        if (! isset($this->sqlResultSetMappings[$name])) {
262
+        if ( ! isset($this->sqlResultSetMappings[$name])) {
263 263
             throw MappingException::resultMappingNotFound($this->entityName, $name);
264 264
         }
265 265
 
Please login to merge, or discard this patch.