Passed
Push — master ( 3cda3f...c35142 )
by Guilherme
09:24
created
lib/Doctrine/ORM/Mapping/Builder/TableMetadataBuilder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,11 +54,11 @@
 block discarded – undo
54 54
             return $tableMetadata;
55 55
         }
56 56
 
57
-        if (! empty($this->tableAnnotation->name)) {
57
+        if ( ! empty($this->tableAnnotation->name)) {
58 58
             $tableMetadata->setName($this->tableAnnotation->name);
59 59
         }
60 60
 
61
-        if (! empty($this->tableAnnotation->schema)) {
61
+        if ( ! empty($this->tableAnnotation->schema)) {
62 62
             $tableMetadata->setSchema($this->tableAnnotation->schema);
63 63
         }
64 64
 
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
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
             return $this->classNames;
214 214
         }
215 215
 
216
-        if (! $this->paths) {
216
+        if ( ! $this->paths) {
217 217
             throw Mapping\MappingException::pathRequired();
218 218
         }
219 219
 
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
         $includedFiles = [];
222 222
 
223 223
         foreach ($this->paths as $path) {
224
-            if (! is_dir($path)) {
224
+            if ( ! is_dir($path)) {
225 225
                 throw Mapping\MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path);
226 226
             }
227 227
 
@@ -230,14 +230,14 @@  discard block
 block discarded – undo
230 230
                     new RecursiveDirectoryIterator($path, FilesystemIterator::SKIP_DOTS),
231 231
                     RecursiveIteratorIterator::LEAVES_ONLY
232 232
                 ),
233
-                '/^.+' . preg_quote($this->fileExtension) . '$/i',
233
+                '/^.+'.preg_quote($this->fileExtension).'$/i',
234 234
                 RecursiveRegexIterator::GET_MATCH
235 235
             );
236 236
 
237 237
             foreach ($iterator as $file) {
238 238
                 $sourceFile = $file[0];
239 239
 
240
-                if (! preg_match('(^phar:)i', $sourceFile)) {
240
+                if ( ! preg_match('(^phar:)i', $sourceFile)) {
241 241
                     $sourceFile = realpath($sourceFile);
242 242
                 }
243 243
 
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
         if ($parent && $parent->inheritanceType === Mapping\InheritanceType::SINGLE_TABLE) {
416 416
             // Handle the case where a middle mapped super class inherits from a single table inheritance tree.
417 417
             do {
418
-                if (! $parent->isMappedSuperclass) {
418
+                if ( ! $parent->isMappedSuperclass) {
419 419
                     $metadata->setTable($parent->table);
420 420
 
421 421
                     break;
@@ -589,15 +589,15 @@  discard block
 block discarded – undo
589 589
         $fieldMetadata->setVersioned($isVersioned);
590 590
         $fieldMetadata->setColumnName($columnName);
591 591
 
592
-        if (! $metadata->isMappedSuperclass) {
592
+        if ( ! $metadata->isMappedSuperclass) {
593 593
             $fieldMetadata->setTableName($metadata->getTableName());
594 594
         }
595 595
 
596
-        if (! empty($columnAnnot->columnDefinition)) {
596
+        if ( ! empty($columnAnnot->columnDefinition)) {
597 597
             $fieldMetadata->setColumnDefinition($columnAnnot->columnDefinition);
598 598
         }
599 599
 
600
-        if (! empty($columnAnnot->length)) {
600
+        if ( ! empty($columnAnnot->length)) {
601 601
             $fieldMetadata->setLength($columnAnnot->length);
602 602
         }
603 603
 
@@ -658,13 +658,13 @@  discard block
 block discarded – undo
658 658
                             'arguments' => $customGeneratorAnnot->arguments,
659 659
                         ];
660 660
 
661
-                        if (! isset($idGeneratorDefinition['class'])) {
661
+                        if ( ! isset($idGeneratorDefinition['class'])) {
662 662
                             throw new Mapping\MappingException(
663 663
                                 sprintf('Cannot instantiate custom generator, no class has been defined')
664 664
                             );
665 665
                         }
666 666
 
667
-                        if (! class_exists($idGeneratorDefinition['class'])) {
667
+                        if ( ! class_exists($idGeneratorDefinition['class'])) {
668 668
                             throw new Mapping\MappingException(
669 669
                                 sprintf('Cannot instantiate custom generator : %s', var_export($idGeneratorDefinition, true))
670 670
                             );
@@ -706,12 +706,12 @@  discard block
 block discarded – undo
706 706
         $assocMetadata->setOrphanRemoval($oneToOneAnnot->orphanRemoval);
707 707
         $assocMetadata->setFetchMode($this->getFetchMode($className, $oneToOneAnnot->fetch));
708 708
 
709
-        if (! empty($oneToOneAnnot->mappedBy)) {
709
+        if ( ! empty($oneToOneAnnot->mappedBy)) {
710 710
             $assocMetadata->setMappedBy($oneToOneAnnot->mappedBy);
711 711
             $assocMetadata->setOwningSide(false);
712 712
         }
713 713
 
714
-        if (! empty($oneToOneAnnot->inversedBy)) {
714
+        if ( ! empty($oneToOneAnnot->inversedBy)) {
715 715
             $assocMetadata->setInversedBy($oneToOneAnnot->inversedBy);
716 716
         }
717 717
 
@@ -777,7 +777,7 @@  discard block
 block discarded – undo
777 777
         $assocMetadata->setCascade($this->getCascade($className, $fieldName, $manyToOneAnnot->cascade));
778 778
         $assocMetadata->setFetchMode($this->getFetchMode($className, $manyToOneAnnot->fetch));
779 779
 
780
-        if (! empty($manyToOneAnnot->inversedBy)) {
780
+        if ( ! empty($manyToOneAnnot->inversedBy)) {
781 781
             $assocMetadata->setInversedBy($manyToOneAnnot->inversedBy);
782 782
         }
783 783
 
@@ -848,7 +848,7 @@  discard block
 block discarded – undo
848 848
         $assocMetadata->setOwningSide(false);
849 849
         $assocMetadata->setMappedBy($oneToManyAnnot->mappedBy);
850 850
 
851
-        if (! empty($oneToManyAnnot->indexBy)) {
851
+        if ( ! empty($oneToManyAnnot->indexBy)) {
852 852
             $assocMetadata->setIndexedBy($oneToManyAnnot->indexBy);
853 853
         }
854 854
 
@@ -901,16 +901,16 @@  discard block
 block discarded – undo
901 901
         $assocMetadata->setOrphanRemoval($manyToManyAnnot->orphanRemoval);
902 902
         $assocMetadata->setFetchMode($this->getFetchMode($className, $manyToManyAnnot->fetch));
903 903
 
904
-        if (! empty($manyToManyAnnot->mappedBy)) {
904
+        if ( ! empty($manyToManyAnnot->mappedBy)) {
905 905
             $assocMetadata->setMappedBy($manyToManyAnnot->mappedBy);
906 906
             $assocMetadata->setOwningSide(false);
907 907
         }
908 908
 
909
-        if (! empty($manyToManyAnnot->inversedBy)) {
909
+        if ( ! empty($manyToManyAnnot->inversedBy)) {
910 910
             $assocMetadata->setInversedBy($manyToManyAnnot->inversedBy);
911 911
         }
912 912
 
913
-        if (! empty($manyToManyAnnot->indexBy)) {
913
+        if ( ! empty($manyToManyAnnot->indexBy)) {
914 914
             $assocMetadata->setIndexedBy($manyToManyAnnot->indexBy);
915 915
         }
916 916
 
@@ -962,15 +962,15 @@  discard block
 block discarded – undo
962 962
         $fieldMetadata->setType(Type::getType($columnAnnot->type));
963 963
         $fieldMetadata->setVersioned($isVersioned);
964 964
 
965
-        if (! empty($columnAnnot->name)) {
965
+        if ( ! empty($columnAnnot->name)) {
966 966
             $fieldMetadata->setColumnName($columnAnnot->name);
967 967
         }
968 968
 
969
-        if (! empty($columnAnnot->columnDefinition)) {
969
+        if ( ! empty($columnAnnot->columnDefinition)) {
970 970
             $fieldMetadata->setColumnDefinition($columnAnnot->columnDefinition);
971 971
         }
972 972
 
973
-        if (! empty($columnAnnot->length)) {
973
+        if ( ! empty($columnAnnot->length)) {
974 974
             $fieldMetadata->setLength($columnAnnot->length);
975 975
         }
976 976
 
@@ -994,11 +994,11 @@  discard block
 block discarded – undo
994 994
     ) : Mapping\JoinTableMetadata {
995 995
         $joinTable = new Mapping\JoinTableMetadata();
996 996
 
997
-        if (! empty($joinTableAnnot->name)) {
997
+        if ( ! empty($joinTableAnnot->name)) {
998 998
             $joinTable->setName($joinTableAnnot->name);
999 999
         }
1000 1000
 
1001
-        if (! empty($joinTableAnnot->schema)) {
1001
+        if ( ! empty($joinTableAnnot->schema)) {
1002 1002
             $joinTable->setSchema($joinTableAnnot->schema);
1003 1003
         }
1004 1004
 
@@ -1026,22 +1026,22 @@  discard block
 block discarded – undo
1026 1026
         $joinColumn = new Mapping\JoinColumnMetadata();
1027 1027
 
1028 1028
         // @todo Remove conditionals for name and referencedColumnName once naming strategy is brought into drivers
1029
-        if (! empty($joinColumnAnnot->name)) {
1029
+        if ( ! empty($joinColumnAnnot->name)) {
1030 1030
             $joinColumn->setColumnName($joinColumnAnnot->name);
1031 1031
         }
1032 1032
 
1033
-        if (! empty($joinColumnAnnot->referencedColumnName)) {
1033
+        if ( ! empty($joinColumnAnnot->referencedColumnName)) {
1034 1034
             $joinColumn->setReferencedColumnName($joinColumnAnnot->referencedColumnName);
1035 1035
         }
1036 1036
 
1037 1037
         $joinColumn->setNullable($joinColumnAnnot->nullable);
1038 1038
         $joinColumn->setUnique($joinColumnAnnot->unique);
1039 1039
 
1040
-        if (! empty($joinColumnAnnot->fieldName)) {
1040
+        if ( ! empty($joinColumnAnnot->fieldName)) {
1041 1041
             $joinColumn->setAliasedName($joinColumnAnnot->fieldName);
1042 1042
         }
1043 1043
 
1044
-        if (! empty($joinColumnAnnot->columnDefinition)) {
1044
+        if ( ! empty($joinColumnAnnot->columnDefinition)) {
1045 1045
             $joinColumn->setColumnDefinition($joinColumnAnnot->columnDefinition);
1046 1046
         }
1047 1047
 
@@ -1081,11 +1081,11 @@  discard block
 block discarded – undo
1081 1081
             $discriminatorColumn->setType(Type::getType($typeName));
1082 1082
             $discriminatorColumn->setColumnName($discriminatorColumnAnnotation->name);
1083 1083
 
1084
-            if (! empty($discriminatorColumnAnnotation->columnDefinition)) {
1084
+            if ( ! empty($discriminatorColumnAnnotation->columnDefinition)) {
1085 1085
                 $discriminatorColumn->setColumnDefinition($discriminatorColumnAnnotation->columnDefinition);
1086 1086
             }
1087 1087
 
1088
-            if (! empty($discriminatorColumnAnnotation->length)) {
1088
+            if ( ! empty($discriminatorColumnAnnotation->length)) {
1089 1089
                 $discriminatorColumn->setLength($discriminatorColumnAnnotation->length);
1090 1090
             }
1091 1091
         }
@@ -1161,7 +1161,7 @@  discard block
 block discarded – undo
1161 1161
             ];
1162 1162
 
1163 1163
             foreach ($entityListenersAnnot->value as $listenerClassName) {
1164
-                if (! class_exists($listenerClassName)) {
1164
+                if ( ! class_exists($listenerClassName)) {
1165 1165
                     throw Mapping\MappingException::entityListenerClassNotFound(
1166 1166
                         $listenerClassName,
1167 1167
                         $metadata->getClassName()
@@ -1203,7 +1203,7 @@  discard block
 block discarded – undo
1203 1203
                 $fieldName = $associationOverride->name;
1204 1204
                 $property  = $metadata->getProperty($fieldName);
1205 1205
 
1206
-                if (! $property) {
1206
+                if ( ! $property) {
1207 1207
                     throw Mapping\MappingException::invalidOverrideFieldName($metadata->getClassName(), $fieldName);
1208 1208
                 }
1209 1209
 
@@ -1237,7 +1237,7 @@  discard block
 block discarded – undo
1237 1237
                 // Check for fetch
1238 1238
                 if ($associationOverride->fetch) {
1239 1239
                     $override->setFetchMode(
1240
-                        constant(Mapping\FetchMode::class . '::' . $associationOverride->fetch)
1240
+                        constant(Mapping\FetchMode::class.'::'.$associationOverride->fetch)
1241 1241
                     );
1242 1242
                 }
1243 1243
 
@@ -1304,7 +1304,7 @@  discard block
 block discarded – undo
1304 1304
     {
1305 1305
         $fetchModeConstant = sprintf('%s::%s', Mapping\FetchMode::class, $fetchMode);
1306 1306
 
1307
-        if (! defined($fetchModeConstant)) {
1307
+        if ( ! defined($fetchModeConstant)) {
1308 1308
             throw Mapping\MappingException::invalidFetchMode($className, $fetchMode);
1309 1309
         }
1310 1310
 
@@ -1319,7 +1319,7 @@  discard block
 block discarded – undo
1319 1319
         $classAnnotations = $this->reader->getClassAnnotations($reflectionClass);
1320 1320
 
1321 1321
         foreach ($classAnnotations as $key => $annot) {
1322
-            if (! is_numeric($key)) {
1322
+            if ( ! is_numeric($key)) {
1323 1323
                 continue;
1324 1324
             }
1325 1325
 
@@ -1337,7 +1337,7 @@  discard block
 block discarded – undo
1337 1337
         $propertyAnnotations = $this->reader->getPropertyAnnotations($reflectionProperty);
1338 1338
 
1339 1339
         foreach ($propertyAnnotations as $key => $annot) {
1340
-            if (! is_numeric($key)) {
1340
+            if ( ! is_numeric($key)) {
1341 1341
                 continue;
1342 1342
             }
1343 1343
 
@@ -1355,7 +1355,7 @@  discard block
 block discarded – undo
1355 1355
         $methodAnnotations = $this->reader->getMethodAnnotations($reflectionMethod);
1356 1356
 
1357 1357
         foreach ($methodAnnotations as $key => $annot) {
1358
-            if (! is_numeric($key)) {
1358
+            if ( ! is_numeric($key)) {
1359 1359
                 continue;
1360 1360
             }
1361 1361
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         if ($parent && $parent->inheritanceType === Mapping\InheritanceType::SINGLE_TABLE) {
82 82
             // Handle the case where a middle mapped super class inherits from a single table inheritance tree.
83 83
             do {
84
-                if (! $parent->isMappedSuperclass) {
84
+                if ( ! $parent->isMappedSuperclass) {
85 85
                     $metadata->setTable($parent->table);
86 86
 
87 87
                     break;
@@ -265,13 +265,13 @@  discard block
 block discarded – undo
265 265
                             'arguments' => [],
266 266
                         ];
267 267
 
268
-                        if (! isset($idGeneratorDefinition['class'])) {
268
+                        if ( ! isset($idGeneratorDefinition['class'])) {
269 269
                             throw new Mapping\MappingException(
270 270
                                 sprintf('Cannot instantiate custom generator, no class has been defined')
271 271
                             );
272 272
                         }
273 273
 
274
-                        if (! class_exists($idGeneratorDefinition['class'])) {
274
+                        if ( ! class_exists($idGeneratorDefinition['class'])) {
275 275
                             throw new Mapping\MappingException(
276 276
                                 sprintf('Cannot instantiate custom generator : %s', var_export($idGeneratorDefinition, true))
277 277
                             );
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
 
429 429
                 if (isset($manyToOneElement['fetch'])) {
430 430
                     $association->setFetchMode(
431
-                        constant('Doctrine\ORM\Mapping\FetchMode::' . (string) $manyToOneElement['fetch'])
431
+                        constant('Doctrine\ORM\Mapping\FetchMode::'.(string) $manyToOneElement['fetch'])
432 432
                     );
433 433
                 }
434 434
 
@@ -585,7 +585,7 @@  discard block
 block discarded – undo
585 585
                 $fieldName = (string) $overrideElement['name'];
586 586
                 $property  = $metadata->getProperty($fieldName);
587 587
 
588
-                if (! $property) {
588
+                if ( ! $property) {
589 589
                     throw Mapping\MappingException::invalidOverrideFieldName($metadata->getClassName(), $fieldName);
590 590
                 }
591 591
 
@@ -643,7 +643,7 @@  discard block
 block discarded – undo
643 643
                 // Check for fetch
644 644
                 if (isset($overrideElement['fetch'])) {
645 645
                     $override->setFetchMode(
646
-                        constant('Doctrine\ORM\Mapping\FetchMode::' . (string) $overrideElement['fetch'])
646
+                        constant('Doctrine\ORM\Mapping\FetchMode::'.(string) $overrideElement['fetch'])
647 647
                     );
648 648
                 }
649 649
 
@@ -654,7 +654,7 @@  discard block
 block discarded – undo
654 654
         // Evaluate <lifecycle-callbacks...>
655 655
         if (isset($xmlRoot->{'lifecycle-callbacks'})) {
656 656
             foreach ($xmlRoot->{'lifecycle-callbacks'}->{'lifecycle-callback'} as $lifecycleCallback) {
657
-                $eventName  = constant(Events::class . '::' . (string) $lifecycleCallback['type']);
657
+                $eventName  = constant(Events::class.'::'.(string) $lifecycleCallback['type']);
658 658
                 $methodName = (string) $lifecycleCallback['method'];
659 659
 
660 660
                 $metadata->addLifecycleCallback($eventName, $methodName);
@@ -666,7 +666,7 @@  discard block
 block discarded – undo
666 666
             foreach ($xmlRoot->{'entity-listeners'}->{'entity-listener'} as $listenerElement) {
667 667
                 $listenerClassName = (string) $listenerElement['class'];
668 668
 
669
-                if (! class_exists($listenerClassName)) {
669
+                if ( ! class_exists($listenerClassName)) {
670 670
                     throw Mapping\MappingException::entityListenerClassNotFound(
671 671
                         $listenerClassName,
672 672
                         $metadata->getClassName()
Please login to merge, or discard this patch.