Failed Conditions
Pull Request — master (#7210)
by Michael
11:17
created
lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
                 $discrColumnName = $metaMappingDiscrColumnName;
84 84
             }
85 85
 
86
-            if (! isset($sqlResult[$discrColumnName])) {
86
+            if ( ! isset($sqlResult[$discrColumnName])) {
87 87
                 throw HydrationException::missingDiscriminatorColumn($entityName, $discrColumnName, key($this->rsm->aliasMap));
88 88
             }
89 89
 
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 
94 94
             $discrMap = $this->class->discriminatorMap;
95 95
 
96
-            if (! isset($discrMap[$sqlResult[$discrColumnName]])) {
96
+            if ( ! isset($discrMap[$sqlResult[$discrColumnName]])) {
97 97
                 throw HydrationException::invalidDiscriminatorValue($sqlResult[$discrColumnName], array_keys($discrMap));
98 98
             }
99 99
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 
111 111
             $cacheKeyInfo = $this->hydrateColumnInfo($column);
112 112
 
113
-            if (! $cacheKeyInfo) {
113
+            if ( ! $cacheKeyInfo) {
114 114
                 continue;
115 115
             }
116 116
 
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
             $fieldName = $cacheKeyInfo['fieldName'];
127 127
 
128 128
             // Prevent overwrite in case of inherit classes using same property name (See AbstractHydrator)
129
-            if (! isset($data[$fieldName]) || ! $valueIsNull) {
129
+            if ( ! isset($data[$fieldName]) || ! $valueIsNull) {
130 130
                 $data[$fieldName] = $value;
131 131
             }
132 132
         }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Configuration/MetadataConfiguration.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
 
79 79
     public function getNamingStrategy() : NamingStrategy
80 80
     {
81
-        if (! $this->namingStrategy) {
81
+        if ( ! $this->namingStrategy) {
82 82
             $this->namingStrategy = new DefaultNamingStrategy();
83 83
         }
84 84
 
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.
lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -142,8 +142,8 @@  discard block
 block discarded – undo
142 142
     ) {
143 143
         $this->reverseEngineerMappingFromDatabase();
144 144
 
145
-        if (! isset($this->classToTableNames[$className])) {
146
-            throw new \InvalidArgumentException('Unknown class ' . $className);
145
+        if ( ! isset($this->classToTableNames[$className])) {
146
+            throw new \InvalidArgumentException('Unknown class '.$className);
147 147
         }
148 148
 
149 149
         // @todo guilhermeblanco This should somehow disappear... =)
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
         foreach ($this->manyToManyTables as $manyTable) {
159 159
             foreach ($manyTable->getForeignKeys() as $foreignKey) {
160 160
                 // foreign key maps to the table of the current entity, many to many association probably exists
161
-                if (! ($loweredTableName === strtolower($foreignKey->getForeignTableName()))) {
161
+                if ( ! ($loweredTableName === strtolower($foreignKey->getForeignTableName()))) {
162 162
                     continue;
163 163
                 }
164 164
 
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
                     }
174 174
                 }
175 175
 
176
-                if (! $otherFk) {
176
+                if ( ! $otherFk) {
177 177
                     // the definition of this many to many table does not contain
178 178
                     // enough foreign key information to continue reverse engineering.
179 179
                     continue;
@@ -254,9 +254,9 @@  discard block
 block discarded – undo
254 254
                 $allForeignKeyColumns = array_merge($allForeignKeyColumns, $foreignKey->getLocalColumns());
255 255
             }
256 256
 
257
-            if (! $table->hasPrimaryKey()) {
257
+            if ( ! $table->hasPrimaryKey()) {
258 258
                 throw new Mapping\MappingException(
259
-                    'Table ' . $table->getName() . ' has no primary key. Doctrine does not ' .
259
+                    'Table '.$table->getName().' has no primary key. Doctrine does not '.
260 260
                     "support reverse engineering from tables that don't have a primary key."
261 261
                 );
262 262
             }
@@ -446,7 +446,7 @@  discard block
 block discarded – undo
446 446
             }
447 447
 
448 448
             // Here we need to check if $fkColumns are the same as $primaryKeys
449
-            if (! array_diff($fkColumns, $primaryKeys)) {
449
+            if ( ! array_diff($fkColumns, $primaryKeys)) {
450 450
                 $metadata->addProperty($associationMapping);
451 451
             } else {
452 452
                 $metadata->addProperty($associationMapping);
@@ -491,7 +491,7 @@  discard block
 block discarded – undo
491 491
      */
492 492
     private function getClassNameForTable($tableName)
493 493
     {
494
-        return $this->namespace . (
494
+        return $this->namespace.(
495 495
             $this->classNamesForTables[$tableName]
496 496
                 ?? Inflector::classify(strtolower($tableName))
497 497
         );
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -413,7 +413,7 @@  discard block
 block discarded – undo
413 413
 
414 414
                 if (isset($manyToOneElement['fetch'])) {
415 415
                     $association->setFetchMode(
416
-                        constant('Doctrine\ORM\Mapping\FetchMode::' . (string) $manyToOneElement['fetch'])
416
+                        constant('Doctrine\ORM\Mapping\FetchMode::'.(string) $manyToOneElement['fetch'])
417 417
                     );
418 418
                 }
419 419
 
@@ -566,7 +566,7 @@  discard block
 block discarded – undo
566 566
                 $fieldName = (string) $overrideElement['name'];
567 567
                 $property  = $metadata->getProperty($fieldName);
568 568
 
569
-                if (! $property) {
569
+                if ( ! $property) {
570 570
                     throw Mapping\MappingException::invalidOverrideFieldName($metadata->getClassName(), $fieldName);
571 571
                 }
572 572
 
@@ -624,7 +624,7 @@  discard block
 block discarded – undo
624 624
                 // Check for fetch
625 625
                 if (isset($overrideElement['fetch'])) {
626 626
                     $override->setFetchMode(
627
-                        constant('Doctrine\ORM\Mapping\FetchMode::' . (string) $overrideElement['fetch'])
627
+                        constant('Doctrine\ORM\Mapping\FetchMode::'.(string) $overrideElement['fetch'])
628 628
                     );
629 629
                 }
630 630
 
@@ -635,7 +635,7 @@  discard block
 block discarded – undo
635 635
         // Evaluate <lifecycle-callbacks...>
636 636
         if (isset($xmlRoot->{'lifecycle-callbacks'})) {
637 637
             foreach ($xmlRoot->{'lifecycle-callbacks'}->{'lifecycle-callback'} as $lifecycleCallback) {
638
-                $eventName  = constant(Events::class . '::' . (string) $lifecycleCallback['type']);
638
+                $eventName  = constant(Events::class.'::'.(string) $lifecycleCallback['type']);
639 639
                 $methodName = (string) $lifecycleCallback['method'];
640 640
 
641 641
                 $metadata->addLifecycleCallback($methodName, $eventName);
@@ -647,7 +647,7 @@  discard block
 block discarded – undo
647 647
             foreach ($xmlRoot->{'entity-listeners'}->{'entity-listener'} as $listenerElement) {
648 648
                 $listenerClassName = (string) $listenerElement['class'];
649 649
 
650
-                if (! class_exists($listenerClassName)) {
650
+                if ( ! class_exists($listenerClassName)) {
651 651
                     throw Mapping\MappingException::entityListenerClassNotFound(
652 652
                         $listenerClassName,
653 653
                         $metadata->getClassName()
@@ -814,7 +814,7 @@  discard block
 block discarded – undo
814 814
         $fieldName = null
815 815
     ) {
816 816
         $baseRegion    = strtolower(str_replace('\\', '_', $metadata->getRootClassName()));
817
-        $defaultRegion = $baseRegion . ($fieldName ? '__' . $fieldName : '');
817
+        $defaultRegion = $baseRegion.($fieldName ? '__'.$fieldName : '');
818 818
 
819 819
         $region = (string) ($cacheMapping['region'] ?? $defaultRegion);
820 820
         $usage  = isset($cacheMapping['usage'])
@@ -843,7 +843,7 @@  discard block
 block discarded – undo
843 843
             Events::preFlush,
844 844
         ];
845 845
 
846
-        return array_filter($events, function ($eventName) use ($method) {
846
+        return array_filter($events, function($eventName) use ($method) {
847 847
             return $eventName === $method->getName();
848 848
         });
849 849
     }
Please login to merge, or discard this patch.