Failed Conditions
Push — develop ( 1e1a22...0ebeb4 )
by Michael
128:26 queued 63:28
created
Factory/Strategy/ConditionalFileWriterClassMetadataGeneratorStrategy.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 
4
-declare(strict_types=1);
4
+declare(strict_types = 1);
5 5
 
6 6
 namespace Doctrine\ORM\Mapping\Factory\Strategy;
7 7
 
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
      */
15 15
     public function generate(string $filePath, ClassMetadataDefinition $definition): void
16 16
     {
17
-        if (! file_exists($filePath)) {
17
+        if ( ! file_exists($filePath)) {
18 18
             parent::generate($filePath, $definition);
19 19
 
20 20
             return;
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Factory/DefaultNamingStrategy.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 
4
-declare(strict_types=1);
4
+declare(strict_types = 1);
5 5
 
6 6
 namespace Doctrine\ORM\Mapping\Factory;
7 7
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      */
57 57
     public function joinColumnName($propertyName, $className = null)
58 58
     {
59
-        return $propertyName . '_' . $this->referenceColumnName();
59
+        return $propertyName.'_'.$this->referenceColumnName();
60 60
     }
61 61
 
62 62
     /**
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
      */
65 65
     public function joinTableName($sourceEntity, $targetEntity, $propertyName = null)
66 66
     {
67
-        return strtolower($this->classToTableName($sourceEntity) . '_' .
67
+        return strtolower($this->classToTableName($sourceEntity).'_'.
68 68
             $this->classToTableName($targetEntity));
69 69
     }
70 70
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      */
74 74
     public function joinKeyColumnName($entityName, $referencedColumnName = null)
75 75
     {
76
-        return strtolower($this->classToTableName($entityName) . '_' .
76
+        return strtolower($this->classToTableName($entityName).'_'.
77 77
             ($referencedColumnName ?: $this->referenceColumnName()));
78 78
     }
79 79
 }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Factory/UnderscoreNamingStrategy.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 
4
-declare(strict_types=1);
4
+declare(strict_types = 1);
5 5
 
6 6
 namespace Doctrine\ORM\Mapping\Factory;
7 7
 
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      */
86 86
     public function referenceColumnName()
87 87
     {
88
-        return $this->case === CASE_UPPER ?  'ID' : 'id';
88
+        return $this->case === CASE_UPPER ? 'ID' : 'id';
89 89
     }
90 90
 
91 91
     /**
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
      */
94 94
     public function joinColumnName($propertyName, $className = null)
95 95
     {
96
-        return $this->underscore($propertyName) . '_' . $this->referenceColumnName();
96
+        return $this->underscore($propertyName).'_'.$this->referenceColumnName();
97 97
     }
98 98
 
99 99
     /**
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
      */
102 102
     public function joinTableName($sourceEntity, $targetEntity, $propertyName = null)
103 103
     {
104
-        return $this->classToTableName($sourceEntity) . '_' . $this->classToTableName($targetEntity);
104
+        return $this->classToTableName($sourceEntity).'_'.$this->classToTableName($targetEntity);
105 105
     }
106 106
     
107 107
     /**
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
      */
110 110
     public function joinKeyColumnName($entityName, $referencedColumnName = null)
111 111
     {
112
-        return $this->classToTableName($entityName) . '_' .
112
+        return $this->classToTableName($entityName).'_'.
113 113
                 ($referencedColumnName ?: $this->referenceColumnName());
114 114
     }
115 115
     
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Factory/RuntimeClassMetadataFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 
4
-declare(strict_types=1);
4
+declare(strict_types = 1);
5 5
 
6 6
 namespace Doctrine\ORM\Mapping\Factory;
7 7
 
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      */
27 27
     protected function getReflectionService() : RuntimeReflectionService
28 28
     {
29
-        if (! $this->reflectionService) {
29
+        if ( ! $this->reflectionService) {
30 30
             $this->reflectionService = new RuntimeReflectionService();
31 31
         }
32 32
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Factory/Autoloader.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 
4
-declare(strict_types=1);
4
+declare(strict_types = 1);
5 5
 
6 6
 namespace Doctrine\ORM\Mapping\Factory;
7 7
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
         // remove namespace separators from remaining class name
39 39
         $fileName = str_replace('\\', '', $classNameRelativeToMetadataNamespace);
40 40
 
41
-        return $metadataDir . DIRECTORY_SEPARATOR . $fileName . '.php';
41
+        return $metadataDir.DIRECTORY_SEPARATOR.$fileName.'.php';
42 42
     }
43 43
 
44 44
     /**
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     {
61 61
         $metadataNamespace = ltrim($metadataNamespace, '\\');
62 62
 
63
-        if (! (null === $notFoundCallback || is_callable($notFoundCallback))) {
63
+        if ( ! (null === $notFoundCallback || is_callable($notFoundCallback))) {
64 64
             $type = is_object($notFoundCallback) ? get_class($notFoundCallback) : gettype($notFoundCallback);
65 65
 
66 66
             throw new InvalidArgumentException(
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
             );
69 69
         }
70 70
 
71
-        $autoloader = function ($className) use ($metadataDir, $metadataNamespace, $notFoundCallback) {
71
+        $autoloader = function($className) use ($metadataDir, $metadataNamespace, $notFoundCallback) {
72 72
             if (0 === strpos($className, $metadataNamespace)) {
73 73
                 $file = Autoloader::resolveFile($metadataDir, $metadataNamespace, $className);
74 74
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Factory/StaticClassMetadataFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 
4
-declare(strict_types=1);
4
+declare(strict_types = 1);
5 5
 
6 6
 namespace Doctrine\ORM\Mapping\Factory;
7 7
 
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      */
27 27
     protected function getReflectionService() : StaticReflectionService
28 28
     {
29
-        if (! $this->reflectionService) {
29
+        if ( ! $this->reflectionService) {
30 30
             $this->reflectionService = new StaticReflectionService();
31 31
         }
32 32
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/ToManyAssociationMetadata.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Mapping;
6 6
 
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
         }
68 68
 
69 69
         // If $value is not a Collection then use an ArrayCollection.
70
-        if (! $collection instanceof Collection) {
70
+        if ( ! $collection instanceof Collection) {
71 71
             // @todo guilhermeblanco Conceptually, support to custom collections by replacing ArrayCollection creation.
72 72
             $collection = new ArrayCollection((array) $collection);
73 73
         }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Driver/FileDriver.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\Mapping\Driver;
6 6
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         if ($locator instanceof FileLocator) {
54 54
             $this->locator = $locator;
55 55
         } else {
56
-            $this->locator = new DefaultFileLocator((array)$locator, $fileExtension);
56
+            $this->locator = new DefaultFileLocator((array) $locator, $fileExtension);
57 57
         }
58 58
     }
59 59
 
@@ -120,8 +120,8 @@  discard block
 block discarded – undo
120 120
         }
121 121
 
122 122
         $result = $this->loadMappingFile($this->locator->findMappingFile($className));
123
-        if (!isset($result[$className])) {
124
-            throw MappingException::invalidMappingFile($className, str_replace('\\', '.', $className) . $this->locator->getFileExtension());
123
+        if ( ! isset($result[$className])) {
124
+            throw MappingException::invalidMappingFile($className, str_replace('\\', '.', $className).$this->locator->getFileExtension());
125 125
         }
126 126
 
127 127
         $this->classCache[$className] = $result[$className];
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
             return false;
143 143
         }
144 144
 
145
-        return !$this->locator->fileExists($className);
145
+        return ! $this->locator->fileExists($className);
146 146
     }
147 147
 
148 148
     /**
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
             $this->initialize();
155 155
         }
156 156
 
157
-        if (! $this->classCache) {
157
+        if ( ! $this->classCache) {
158 158
             return (array) $this->locator->getAllClassNames($this->globalBasename);
159 159
         }
160 160
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Driver/NewAnnotationDriver.php 1 patch
Spacing   +32 added lines, -32 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
 
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 
119 119
         $classNames = array_filter(
120 120
             $this->locator->getAllClassNames(null),
121
-            function ($className) {
121
+            function($className) {
122 122
                 return ! $this->isTransient($className);
123 123
             }
124 124
         );
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
     )
207 207
     {
208 208
         /** @var Annotation\Entity $entityAnnot */
209
-        $entityAnnot  = $classAnnotations[Annotation\Entity::class];
209
+        $entityAnnot = $classAnnotations[Annotation\Entity::class];
210 210
         $classMetadata = new Mapping\ClassMetadata($reflectionClass->getName(), $parent);
211 211
 
212 212
         if ($entityAnnot->repositoryClass !== null) {
@@ -272,12 +272,12 @@  discard block
 block discarded – undo
272 272
             /** @var Annotation\NamedQueries $namedQueriesAnnot */
273 273
             $namedQueriesAnnot = $classAnnotations[Annotation\NamedQueries::class];
274 274
 
275
-            if (! is_array($namedQueriesAnnot->value)) {
275
+            if ( ! is_array($namedQueriesAnnot->value)) {
276 276
                 throw new \UnexpectedValueException("@NamedQueries should contain an array of @NamedQuery annotations.");
277 277
             }
278 278
 
279 279
             foreach ($namedQueriesAnnot->value as $namedQuery) {
280
-                if (! ($namedQuery instanceof Annotation\NamedQuery)) {
280
+                if ( ! ($namedQuery instanceof Annotation\NamedQuery)) {
281 281
                     throw new \UnexpectedValueException("@NamedQueries should contain an array of @NamedQuery annotations.");
282 282
                 }
283 283
 
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
             foreach ($entityListenersAnnot->value as $item) {
294 294
                 $listenerClassName = $classMetadata->fullyQualifiedClassName($item);
295 295
 
296
-                if (! class_exists($listenerClassName)) {
296
+                if ( ! class_exists($listenerClassName)) {
297 297
                     throw Mapping\MappingException::entityListenerClassNotFound(
298 298
                         $listenerClassName,
299 299
                         $reflectionClass->getName()
@@ -340,15 +340,15 @@  discard block
 block discarded – undo
340 340
 
341 341
                     $discriminatorColumn->setColumnName($discriminatorColumnAnnot->name);
342 342
 
343
-                    if (! empty($discriminatorColumnAnnot->columnDefinition)) {
343
+                    if ( ! empty($discriminatorColumnAnnot->columnDefinition)) {
344 344
                         $discriminatorColumn->setColumnDefinition($discriminatorColumnAnnot->columnDefinition);
345 345
                     }
346 346
 
347
-                    if (! empty($discriminatorColumnAnnot->type)) {
347
+                    if ( ! empty($discriminatorColumnAnnot->type)) {
348 348
                         $discriminatorColumn->setType(Type::getType($discriminatorColumnAnnot->type));
349 349
                     }
350 350
 
351
-                    if (! empty($discriminatorColumnAnnot->length)) {
351
+                    if ( ! empty($discriminatorColumnAnnot->length)) {
352 352
                         $discriminatorColumn->setLength($discriminatorColumnAnnot->length);
353 353
                     }
354 354
                 }
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
                     /** @var Annotation\DiscriminatorMap $discriminatorMapAnnotation */
365 365
                     $discriminatorMapAnnotation = $classAnnotations[Annotation\DiscriminatorMap::class];
366 366
                     $discriminatorMap           = array_map(
367
-                        function ($className) use ($classMetadata) {
367
+                        function($className) use ($classMetadata) {
368 368
                             return $classMetadata->fullyQualifiedClassName($className);
369 369
                         },
370 370
                         $discriminatorMapAnnotation->value
@@ -415,11 +415,11 @@  discard block
 block discarded – undo
415 415
     {
416 416
         $table = new Mapping\TableMetadata();
417 417
 
418
-        if (! empty($tableAnnot->name)) {
418
+        if ( ! empty($tableAnnot->name)) {
419 419
             $table->setName($tableAnnot->name);
420 420
         }
421 421
 
422
-        if (! empty($tableAnnot->schema)) {
422
+        if ( ! empty($tableAnnot->schema)) {
423 423
             $table->setSchema($tableAnnot->schema);
424 424
         }
425 425
 
@@ -507,7 +507,7 @@  discard block
 block discarded – undo
507 507
     {
508 508
         $usage         = constant(sprintf('%s::%s', Mapping\CacheUsage::class, $cacheAnnot->usage));
509 509
         $baseRegion    = strtolower(str_replace('\\', '_', $metadata->getRootClassName()));
510
-        $defaultRegion = $baseRegion . ($fieldName ? '__' . $fieldName : '');
510
+        $defaultRegion = $baseRegion.($fieldName ? '__'.$fieldName : '');
511 511
 
512 512
         return new Mapping\CacheMetadata($usage, $cacheAnnot->region ?: $defaultRegion);
513 513
     }
@@ -629,11 +629,11 @@  discard block
 block discarded – undo
629 629
             $fieldMetadata->setPrimaryKey(true);
630 630
         }
631 631
 
632
-        if (! empty($columnAnnot->columnDefinition)) {
632
+        if ( ! empty($columnAnnot->columnDefinition)) {
633 633
             $fieldMetadata->setColumnDefinition($columnAnnot->columnDefinition);
634 634
         }
635 635
 
636
-        if (! empty($columnAnnot->length)) {
636
+        if ( ! empty($columnAnnot->length)) {
637 637
             $fieldMetadata->setLength($columnAnnot->length);
638 638
         }
639 639
 
@@ -654,7 +654,7 @@  discard block
 block discarded – undo
654 654
                     break;
655 655
 
656 656
                 default:
657
-                    if (! isset($customOptions['default'])) {
657
+                    if ( ! isset($customOptions['default'])) {
658 658
                         throw Mapping\MappingException::unsupportedOptimisticLockingType($fieldMetadata->getType());
659 659
                     }
660 660
             }
@@ -695,11 +695,11 @@  discard block
 block discarded – undo
695 695
         $assocMetadata->setOrphanRemoval($oneToOneAnnot->orphanRemoval);
696 696
         $assocMetadata->setFetchMode($this->getFetchMode($className, $oneToOneAnnot->fetch));
697 697
 
698
-        if (! empty($oneToOneAnnot->mappedBy)) {
698
+        if ( ! empty($oneToOneAnnot->mappedBy)) {
699 699
             $assocMetadata->setMappedBy($oneToOneAnnot->mappedBy);
700 700
         }
701 701
 
702
-        if (! empty($oneToOneAnnot->inversedBy)) {
702
+        if ( ! empty($oneToOneAnnot->inversedBy)) {
703 703
             $assocMetadata->setInversedBy($oneToOneAnnot->inversedBy);
704 704
         }
705 705
 
@@ -778,7 +778,7 @@  discard block
 block discarded – undo
778 778
         $assocMetadata->setCascade($this->getCascade($className, $fieldName, $manyToOneAnnot->cascade));
779 779
         $assocMetadata->setFetchMode($this->getFetchMode($className, $manyToOneAnnot->fetch));
780 780
 
781
-        if (! empty($manyToOneAnnot->inversedBy)) {
781
+        if ( ! empty($manyToOneAnnot->inversedBy)) {
782 782
             $assocMetadata->setInversedBy($manyToOneAnnot->inversedBy);
783 783
         }
784 784
 
@@ -858,11 +858,11 @@  discard block
 block discarded – undo
858 858
         $assocMetadata->setOrphanRemoval($oneToManyAnnot->orphanRemoval);
859 859
         $assocMetadata->setFetchMode($this->getFetchMode($className, $oneToManyAnnot->fetch));
860 860
 
861
-        if (! empty($oneToManyAnnot->mappedBy)) {
861
+        if ( ! empty($oneToManyAnnot->mappedBy)) {
862 862
             $assocMetadata->setMappedBy($oneToManyAnnot->mappedBy);
863 863
         }
864 864
 
865
-        if (! empty($oneToManyAnnot->indexBy)) {
865
+        if ( ! empty($oneToManyAnnot->indexBy)) {
866 866
             $assocMetadata->setIndexedBy($oneToManyAnnot->indexBy);
867 867
         }
868 868
 
@@ -919,15 +919,15 @@  discard block
 block discarded – undo
919 919
         $assocMetadata->setOrphanRemoval($manyToManyAnnot->orphanRemoval);
920 920
         $assocMetadata->setFetchMode($this->getFetchMode($className, $manyToManyAnnot->fetch));
921 921
 
922
-        if (! empty($manyToManyAnnot->mappedBy)) {
922
+        if ( ! empty($manyToManyAnnot->mappedBy)) {
923 923
             $assocMetadata->setMappedBy($manyToManyAnnot->mappedBy);
924 924
         }
925 925
 
926
-        if (! empty($manyToManyAnnot->inversedBy)) {
926
+        if ( ! empty($manyToManyAnnot->inversedBy)) {
927 927
             $assocMetadata->setInversedBy($manyToManyAnnot->inversedBy);
928 928
         }
929 929
 
930
-        if (! empty($manyToManyAnnot->indexBy)) {
930
+        if ( ! empty($manyToManyAnnot->indexBy)) {
931 931
             $assocMetadata->setIndexedBy($manyToManyAnnot->indexBy);
932 932
         }
933 933
 
@@ -983,11 +983,11 @@  discard block
 block discarded – undo
983 983
     {
984 984
         $joinTable = new Mapping\JoinTableMetadata();
985 985
 
986
-        if (! empty($joinTableAnnot->name)) {
986
+        if ( ! empty($joinTableAnnot->name)) {
987 987
             $joinTable->setName($joinTableAnnot->name);
988 988
         }
989 989
 
990
-        if (! empty($joinTableAnnot->schema)) {
990
+        if ( ! empty($joinTableAnnot->schema)) {
991 991
             $joinTable->setSchema($joinTableAnnot->schema);
992 992
         }
993 993
 
@@ -1043,11 +1043,11 @@  discard block
 block discarded – undo
1043 1043
         $joinColumn->setNullable($joinColumnAnnot->nullable);
1044 1044
         $joinColumn->setUnique($joinColumnAnnot->unique);
1045 1045
 
1046
-        if (! empty($joinColumnAnnot->fieldName)) {
1046
+        if ( ! empty($joinColumnAnnot->fieldName)) {
1047 1047
             $joinColumn->setAliasedName($joinColumnAnnot->fieldName);
1048 1048
         }
1049 1049
 
1050
-        if (! empty($joinColumnAnnot->columnDefinition)) {
1050
+        if ( ! empty($joinColumnAnnot->columnDefinition)) {
1051 1051
             $joinColumn->setColumnDefinition($joinColumnAnnot->columnDefinition);
1052 1052
         }
1053 1053
 
@@ -1105,7 +1105,7 @@  discard block
 block discarded – undo
1105 1105
     {
1106 1106
         $fetchModeConstant = sprintf('%s::%s', Mapping\FetchMode::class, $fetchMode);
1107 1107
 
1108
-        if (! defined($fetchModeConstant)) {
1108
+        if ( ! defined($fetchModeConstant)) {
1109 1109
             throw Mapping\MappingException::invalidFetchMode($className, $fetchMode);
1110 1110
         }
1111 1111
 
@@ -1149,7 +1149,7 @@  discard block
 block discarded – undo
1149 1149
         $classAnnotations = $this->reader->getClassAnnotations($reflectionClass);
1150 1150
 
1151 1151
         foreach ($classAnnotations as $key => $annot) {
1152
-            if (! is_numeric($key)) {
1152
+            if ( ! is_numeric($key)) {
1153 1153
                 continue;
1154 1154
             }
1155 1155
 
@@ -1169,7 +1169,7 @@  discard block
 block discarded – undo
1169 1169
         $propertyAnnotations = $this->reader->getPropertyAnnotations($reflectionProperty);
1170 1170
 
1171 1171
         foreach ($propertyAnnotations as $key => $annot) {
1172
-            if (! is_numeric($key)) {
1172
+            if ( ! is_numeric($key)) {
1173 1173
                 continue;
1174 1174
             }
1175 1175
 
@@ -1189,7 +1189,7 @@  discard block
 block discarded – undo
1189 1189
         $methodAnnotations = $this->reader->getMethodAnnotations($reflectionMethod);
1190 1190
 
1191 1191
         foreach ($methodAnnotations as $key => $annot) {
1192
-            if (! is_numeric($key)) {
1192
+            if ( ! is_numeric($key)) {
1193 1193
                 continue;
1194 1194
             }
1195 1195
 
Please login to merge, or discard this patch.