Failed Conditions
Push — master ( e747f7...5b15a6 )
by Guilherme
19:57
created
lib/Doctrine/ORM/Mapping/AbstractClassMetadataFactory.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
      */
127 127
     public function getAllMetadata() : array
128 128
     {
129
-        if (! $this->initialized) {
129
+        if ( ! $this->initialized) {
130 130
             $this->initialize();
131 131
         }
132 132
 
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 
167 167
         try {
168 168
             if ($this->cacheDriver) {
169
-                $cached = $this->cacheDriver->fetch($entityClassName . $this->cacheSalt);
169
+                $cached = $this->cacheDriver->fetch($entityClassName.$this->cacheSalt);
170 170
 
171 171
                 if ($cached instanceof ClassMetadata) {
172 172
                     $this->loadedMetadata[$entityClassName] = $cached;
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
                     foreach ($this->loadMetadata($entityClassName, $metadataBuildingContext) as $loadedClass) {
177 177
                         $loadedClassName = $loadedClass->getClassName();
178 178
 
179
-                        $this->cacheDriver->save($loadedClassName . $this->cacheSalt, $loadedClass, null);
179
+                        $this->cacheDriver->save($loadedClassName.$this->cacheSalt, $loadedClass, null);
180 180
                     }
181 181
                 }
182 182
             } else {
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
         } catch (CommonMappingException $loadingException) {
186 186
             $fallbackMetadataResponse = $this->onNotFoundMetadata($entityClassName, $metadataBuildingContext);
187 187
 
188
-            if (! $fallbackMetadataResponse) {
188
+            if ( ! $fallbackMetadataResponse) {
189 189
                 throw $loadingException;
190 190
             }
191 191
 
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
      */
222 222
     protected function loadMetadata(string $name, ClassMetadataBuildingContext $metadataBuildingContext) : array
223 223
     {
224
-        if (! $this->initialized) {
224
+        if ( ! $this->initialized) {
225 225
             $this->initialize();
226 226
         }
227 227
 
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
      */
258 258
     public function isTransient($className) : bool
259 259
     {
260
-        if (! $this->initialized) {
260
+        if ( ! $this->initialized) {
261 261
             $this->initialize();
262 262
         }
263 263
 
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
         $parentClasses = [];
282 282
 
283 283
         foreach (array_reverse($this->getReflectionService()->getParentClasses($name)) as $parentClass) {
284
-            if (! $this->getDriver()->isTransient($parentClass)) {
284
+            if ( ! $this->getDriver()->isTransient($parentClass)) {
285 285
                 $parentClasses[] = $parentClass;
286 286
             }
287 287
         }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Factory/AbstractClassMetadataFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@
 block discarded – undo
160 160
         ?ClassMetadata $parent,
161 161
         ClassMetadataBuildingContext $metadataBuildingContext
162 162
     ) : ClassMetadataDefinition {
163
-        if (! isset($this->definitions[$className])) {
163
+        if ( ! isset($this->definitions[$className])) {
164 164
             $this->definitions[$className] = $this->definitionFactory->build($className, $parent, $metadataBuildingContext);
165 165
         }
166 166
 
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
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         ?string $className = null,
44 44
         ?string $embeddedClassName = null
45 45
     ) : string {
46
-        return $propertyName . '_' . $embeddedColumnName;
46
+        return $propertyName.'_'.$embeddedColumnName;
47 47
     }
48 48
 
49 49
     /**
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      */
60 60
     public function joinColumnName(string $propertyName, ?string $className = null) : string
61 61
     {
62
-        return $propertyName . '_' . $this->referenceColumnName();
62
+        return $propertyName.'_'.$this->referenceColumnName();
63 63
     }
64 64
 
65 65
     /**
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      */
68 68
     public function joinTableName(string $sourceEntity, string $targetEntity, ?string $propertyName = null) : string
69 69
     {
70
-        return strtolower($this->classToTableName($sourceEntity) . '_' .
70
+        return strtolower($this->classToTableName($sourceEntity).'_'.
71 71
             $this->classToTableName($targetEntity));
72 72
     }
73 73
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     public function joinKeyColumnName(string $entityName, ?string $referencedColumnName = null) : string
78 78
     {
79 79
         return strtolower(
80
-            $this->classToTableName($entityName) . '_' . ($referencedColumnName ?: $this->referenceColumnName())
80
+            $this->classToTableName($entityName).'_'.($referencedColumnName ?: $this->referenceColumnName())
81 81
         );
82 82
     }
83 83
 }
Please login to merge, or discard this patch.
Factory/Strategy/ConditionalFileWriterClassMetadataGeneratorStrategy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
         ClassMetadataDefinition $definition,
19 19
         ClassMetadataBuildingContext $metadataBuildingContext
20 20
     ) : void {
21
-        if (! file_exists($filePath)) {
21
+        if ( ! file_exists($filePath)) {
22 22
             parent::generate($filePath, $definition, $metadataBuildingContext);
23 23
 
24 24
             return;
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Factory/UnderscoreNamingStrategy.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         ?string $className = null,
81 81
         ?string $embeddedClassName = null
82 82
     ) : string {
83
-        return $this->underscore($propertyName) . '_' . $embeddedColumnName;
83
+        return $this->underscore($propertyName).'_'.$embeddedColumnName;
84 84
     }
85 85
 
86 86
     /**
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
      */
97 97
     public function joinColumnName(string $propertyName, ?string $className = null) : string
98 98
     {
99
-        return $this->underscore($propertyName) . '_' . $this->referenceColumnName();
99
+        return $this->underscore($propertyName).'_'.$this->referenceColumnName();
100 100
     }
101 101
 
102 102
     /**
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
      */
105 105
     public function joinTableName(string $sourceEntity, string $targetEntity, ?string $propertyName = null) : string
106 106
     {
107
-        return $this->classToTableName($sourceEntity) . '_' . $this->classToTableName($targetEntity);
107
+        return $this->classToTableName($sourceEntity).'_'.$this->classToTableName($targetEntity);
108 108
     }
109 109
 
110 110
     /**
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
      */
113 113
     public function joinKeyColumnName(string $entityName, ?string $referencedColumnName = null) : string
114 114
     {
115
-        return $this->classToTableName($entityName) . '_' .
115
+        return $this->classToTableName($entityName).'_'.
116 116
                 ($referencedColumnName ?: $this->referenceColumnName());
117 117
     }
118 118
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Factory/ClassMetadataDefinitionFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
     ) : ClassMetadataDefinition {
31 31
         $definition = $this->createDefinition($className, $parentMetadata);
32 32
 
33
-        if (! class_exists($definition->metadataClassName, false)) {
33
+        if ( ! class_exists($definition->metadataClassName, false)) {
34 34
             $metadataClassPath = $this->resolver->resolveMetadataClassPath($className);
35 35
 
36 36
             $this->generatorStrategy->generate($metadataClassPath, $definition, $metadataBuildingContext);
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -143,8 +143,8 @@  discard block
 block discarded – undo
143 143
     ) : Mapping\ComponentMetadata {
144 144
         $this->reverseEngineerMappingFromDatabase();
145 145
 
146
-        if (! isset($this->classToTableNames[$className])) {
147
-            throw new InvalidArgumentException('Unknown class ' . $className);
146
+        if ( ! isset($this->classToTableNames[$className])) {
147
+            throw new InvalidArgumentException('Unknown class '.$className);
148 148
         }
149 149
 
150 150
         $metadata = new Mapping\ClassMetadata($className, $parent, $metadataBuildingContext);
@@ -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;
@@ -256,9 +256,9 @@  discard block
 block discarded – undo
256 256
                 $allForeignKeyColumns = array_merge($allForeignKeyColumns, $foreignKey->getLocalColumns());
257 257
             }
258 258
 
259
-            if (! $table->hasPrimaryKey()) {
259
+            if ( ! $table->hasPrimaryKey()) {
260 260
                 throw new Mapping\MappingException(
261
-                    'Table ' . $table->getName() . ' has no primary key. Doctrine does not ' .
261
+                    'Table '.$table->getName().' has no primary key. Doctrine does not '.
262 262
                     "support reverse engineering from tables that don't have a primary key."
263 263
                 );
264 264
             }
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
             }
449 449
 
450 450
             // Here we need to check if $fkColumns are the same as $primaryKeys
451
-            if (! array_diff($fkColumns, $primaryKeys)) {
451
+            if ( ! array_diff($fkColumns, $primaryKeys)) {
452 452
                 $metadata->addProperty($associationMapping);
453 453
             } else {
454 454
                 $metadata->addProperty($associationMapping);
@@ -493,7 +493,7 @@  discard block
 block discarded – undo
493 493
      */
494 494
     private function getClassNameForTable($tableName)
495 495
     {
496
-        return $this->namespace . (
496
+        return $this->namespace.(
497 497
             $this->classNamesForTables[$tableName]
498 498
                 ?? Inflector::classify(strtolower($tableName))
499 499
         );
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
             return $this->classNames;
213 213
         }
214 214
 
215
-        if (! $this->paths) {
215
+        if ( ! $this->paths) {
216 216
             throw Mapping\MappingException::pathRequired();
217 217
         }
218 218
 
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
         $includedFiles = [];
221 221
 
222 222
         foreach ($this->paths as $path) {
223
-            if (! is_dir($path)) {
223
+            if ( ! is_dir($path)) {
224 224
                 throw Mapping\MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path);
225 225
             }
226 226
 
@@ -229,14 +229,14 @@  discard block
 block discarded – undo
229 229
                     new RecursiveDirectoryIterator($path, FilesystemIterator::SKIP_DOTS),
230 230
                     RecursiveIteratorIterator::LEAVES_ONLY
231 231
                 ),
232
-                '/^.+' . preg_quote($this->fileExtension) . '$/i',
232
+                '/^.+'.preg_quote($this->fileExtension).'$/i',
233 233
                 RecursiveRegexIterator::GET_MATCH
234 234
             );
235 235
 
236 236
             foreach ($iterator as $file) {
237 237
                 $sourceFile = $file[0];
238 238
 
239
-                if (! preg_match('(^phar:)i', $sourceFile)) {
239
+                if ( ! preg_match('(^phar:)i', $sourceFile)) {
240 240
                     $sourceFile = realpath($sourceFile);
241 241
                 }
242 242
 
@@ -623,12 +623,12 @@  discard block
 block discarded – undo
623 623
         $assocMetadata->setOrphanRemoval($oneToOneAnnot->orphanRemoval);
624 624
         $assocMetadata->setFetchMode($this->getFetchMode($className, $oneToOneAnnot->fetch));
625 625
 
626
-        if (! empty($oneToOneAnnot->mappedBy)) {
626
+        if ( ! empty($oneToOneAnnot->mappedBy)) {
627 627
             $assocMetadata->setMappedBy($oneToOneAnnot->mappedBy);
628 628
             $assocMetadata->setOwningSide(false);
629 629
         }
630 630
 
631
-        if (! empty($oneToOneAnnot->inversedBy)) {
631
+        if ( ! empty($oneToOneAnnot->inversedBy)) {
632 632
             $assocMetadata->setInversedBy($oneToOneAnnot->inversedBy);
633 633
         }
634 634
 
@@ -686,7 +686,7 @@  discard block
 block discarded – undo
686 686
         $assocMetadata->setCascade($this->getCascade($className, $fieldName, $manyToOneAnnot->cascade));
687 687
         $assocMetadata->setFetchMode($this->getFetchMode($className, $manyToOneAnnot->fetch));
688 688
 
689
-        if (! empty($manyToOneAnnot->inversedBy)) {
689
+        if ( ! empty($manyToOneAnnot->inversedBy)) {
690 690
             $assocMetadata->setInversedBy($manyToOneAnnot->inversedBy);
691 691
         }
692 692
 
@@ -747,7 +747,7 @@  discard block
 block discarded – undo
747 747
         $assocMetadata->setOwningSide(false);
748 748
         $assocMetadata->setMappedBy($oneToManyAnnot->mappedBy);
749 749
 
750
-        if (! empty($oneToManyAnnot->indexBy)) {
750
+        if ( ! empty($oneToManyAnnot->indexBy)) {
751 751
             $assocMetadata->setIndexedBy($oneToManyAnnot->indexBy);
752 752
         }
753 753
 
@@ -790,16 +790,16 @@  discard block
 block discarded – undo
790 790
         $assocMetadata->setOrphanRemoval($manyToManyAnnot->orphanRemoval);
791 791
         $assocMetadata->setFetchMode($this->getFetchMode($className, $manyToManyAnnot->fetch));
792 792
 
793
-        if (! empty($manyToManyAnnot->mappedBy)) {
793
+        if ( ! empty($manyToManyAnnot->mappedBy)) {
794 794
             $assocMetadata->setMappedBy($manyToManyAnnot->mappedBy);
795 795
             $assocMetadata->setOwningSide(false);
796 796
         }
797 797
 
798
-        if (! empty($manyToManyAnnot->inversedBy)) {
798
+        if ( ! empty($manyToManyAnnot->inversedBy)) {
799 799
             $assocMetadata->setInversedBy($manyToManyAnnot->inversedBy);
800 800
         }
801 801
 
802
-        if (! empty($manyToManyAnnot->indexBy)) {
802
+        if ( ! empty($manyToManyAnnot->indexBy)) {
803 803
             $assocMetadata->setIndexedBy($manyToManyAnnot->indexBy);
804 804
         }
805 805
 
@@ -842,15 +842,15 @@  discard block
 block discarded – undo
842 842
 
843 843
         $fieldMetadata->setType(Type::getType($columnAnnot->type));
844 844
 
845
-        if (! empty($columnAnnot->name)) {
845
+        if ( ! empty($columnAnnot->name)) {
846 846
             $fieldMetadata->setColumnName($columnAnnot->name);
847 847
         }
848 848
 
849
-        if (! empty($columnAnnot->columnDefinition)) {
849
+        if ( ! empty($columnAnnot->columnDefinition)) {
850 850
             $fieldMetadata->setColumnDefinition($columnAnnot->columnDefinition);
851 851
         }
852 852
 
853
-        if (! empty($columnAnnot->length)) {
853
+        if ( ! empty($columnAnnot->length)) {
854 854
             $fieldMetadata->setLength($columnAnnot->length);
855 855
         }
856 856
 
@@ -873,11 +873,11 @@  discard block
 block discarded – undo
873 873
         Annotation\Table $tableAnnot,
874 874
         Mapping\TableMetadata $tableMetadata
875 875
     ) : Mapping\TableMetadata {
876
-        if (! empty($tableAnnot->name)) {
876
+        if ( ! empty($tableAnnot->name)) {
877 877
             $tableMetadata->setName($tableAnnot->name);
878 878
         }
879 879
 
880
-        if (! empty($tableAnnot->schema)) {
880
+        if ( ! empty($tableAnnot->schema)) {
881 881
             $tableMetadata->setSchema($tableAnnot->schema);
882 882
         }
883 883
 
@@ -915,11 +915,11 @@  discard block
 block discarded – undo
915 915
     ) : Mapping\JoinTableMetadata {
916 916
         $joinTable = new Mapping\JoinTableMetadata();
917 917
 
918
-        if (! empty($joinTableAnnot->name)) {
918
+        if ( ! empty($joinTableAnnot->name)) {
919 919
             $joinTable->setName($joinTableAnnot->name);
920 920
         }
921 921
 
922
-        if (! empty($joinTableAnnot->schema)) {
922
+        if ( ! empty($joinTableAnnot->schema)) {
923 923
             $joinTable->setSchema($joinTableAnnot->schema);
924 924
         }
925 925
 
@@ -947,22 +947,22 @@  discard block
 block discarded – undo
947 947
         $joinColumn = new Mapping\JoinColumnMetadata();
948 948
 
949 949
         // @todo Remove conditionals for name and referencedColumnName once naming strategy is brought into drivers
950
-        if (! empty($joinColumnAnnot->name)) {
950
+        if ( ! empty($joinColumnAnnot->name)) {
951 951
             $joinColumn->setColumnName($joinColumnAnnot->name);
952 952
         }
953 953
 
954
-        if (! empty($joinColumnAnnot->referencedColumnName)) {
954
+        if ( ! empty($joinColumnAnnot->referencedColumnName)) {
955 955
             $joinColumn->setReferencedColumnName($joinColumnAnnot->referencedColumnName);
956 956
         }
957 957
 
958 958
         $joinColumn->setNullable($joinColumnAnnot->nullable);
959 959
         $joinColumn->setUnique($joinColumnAnnot->unique);
960 960
 
961
-        if (! empty($joinColumnAnnot->fieldName)) {
961
+        if ( ! empty($joinColumnAnnot->fieldName)) {
962 962
             $joinColumn->setAliasedName($joinColumnAnnot->fieldName);
963 963
         }
964 964
 
965
-        if (! empty($joinColumnAnnot->columnDefinition)) {
965
+        if ( ! empty($joinColumnAnnot->columnDefinition)) {
966 966
             $joinColumn->setColumnDefinition($joinColumnAnnot->columnDefinition);
967 967
         }
968 968
 
@@ -984,7 +984,7 @@  discard block
 block discarded – undo
984 984
         $fieldName = null
985 985
     ) : Mapping\CacheMetadata {
986 986
         $baseRegion    = strtolower(str_replace('\\', '_', $metadata->getRootClassName()));
987
-        $defaultRegion = $baseRegion . ($fieldName ? '__' . $fieldName : '');
987
+        $defaultRegion = $baseRegion.($fieldName ? '__'.$fieldName : '');
988 988
 
989 989
         $usage  = constant(sprintf('%s::%s', Mapping\CacheUsage::class, $cacheAnnot->usage));
990 990
         $region = $cacheAnnot->region ?: $defaultRegion;
@@ -1006,7 +1006,7 @@  discard block
 block discarded – undo
1006 1006
         if ($parent && $parent->inheritanceType === Mapping\InheritanceType::SINGLE_TABLE) {
1007 1007
             // Handle the case where a middle mapped super class inherits from a single table inheritance tree.
1008 1008
             do {
1009
-                if (! $parent->isMappedSuperclass) {
1009
+                if ( ! $parent->isMappedSuperclass) {
1010 1010
                     $metadata->setTable($parent->table);
1011 1011
 
1012 1012
                     break;
@@ -1062,11 +1062,11 @@  discard block
 block discarded – undo
1062 1062
             $discriminatorColumn->setType(Type::getType($typeName));
1063 1063
             $discriminatorColumn->setColumnName($discriminatorColumnAnnotation->name);
1064 1064
 
1065
-            if (! empty($discriminatorColumnAnnotation->columnDefinition)) {
1065
+            if ( ! empty($discriminatorColumnAnnotation->columnDefinition)) {
1066 1066
                 $discriminatorColumn->setColumnDefinition($discriminatorColumnAnnotation->columnDefinition);
1067 1067
             }
1068 1068
 
1069
-            if (! empty($discriminatorColumnAnnotation->length)) {
1069
+            if ( ! empty($discriminatorColumnAnnotation->length)) {
1070 1070
                 $discriminatorColumn->setLength($discriminatorColumnAnnotation->length);
1071 1071
             }
1072 1072
         }
@@ -1118,7 +1118,7 @@  discard block
 block discarded – undo
1118 1118
             $entityListenersAnnot = $classAnnotations[Annotation\EntityListeners::class];
1119 1119
 
1120 1120
             foreach ($entityListenersAnnot->value as $listenerClassName) {
1121
-                if (! class_exists($listenerClassName)) {
1121
+                if ( ! class_exists($listenerClassName)) {
1122 1122
                     throw Mapping\MappingException::entityListenerClassNotFound(
1123 1123
                         $listenerClassName,
1124 1124
                         $metadata->getClassName()
@@ -1156,7 +1156,7 @@  discard block
 block discarded – undo
1156 1156
                 $fieldName = $associationOverride->name;
1157 1157
                 $property  = $metadata->getProperty($fieldName);
1158 1158
 
1159
-                if (! $property) {
1159
+                if ( ! $property) {
1160 1160
                     throw Mapping\MappingException::invalidOverrideFieldName($metadata->getClassName(), $fieldName);
1161 1161
                 }
1162 1162
 
@@ -1190,7 +1190,7 @@  discard block
 block discarded – undo
1190 1190
                 // Check for fetch
1191 1191
                 if ($associationOverride->fetch) {
1192 1192
                     $override->setFetchMode(
1193
-                        constant(Mapping\FetchMode::class . '::' . $associationOverride->fetch)
1193
+                        constant(Mapping\FetchMode::class.'::'.$associationOverride->fetch)
1194 1194
                     );
1195 1195
                 }
1196 1196
 
@@ -1279,7 +1279,7 @@  discard block
 block discarded – undo
1279 1279
     {
1280 1280
         $fetchModeConstant = sprintf('%s::%s', Mapping\FetchMode::class, $fetchMode);
1281 1281
 
1282
-        if (! defined($fetchModeConstant)) {
1282
+        if ( ! defined($fetchModeConstant)) {
1283 1283
             throw Mapping\MappingException::invalidFetchMode($className, $fetchMode);
1284 1284
         }
1285 1285
 
@@ -1325,7 +1325,7 @@  discard block
 block discarded – undo
1325 1325
         $classAnnotations = $this->reader->getClassAnnotations($reflectionClass);
1326 1326
 
1327 1327
         foreach ($classAnnotations as $key => $annot) {
1328
-            if (! is_numeric($key)) {
1328
+            if ( ! is_numeric($key)) {
1329 1329
                 continue;
1330 1330
             }
1331 1331
 
@@ -1343,7 +1343,7 @@  discard block
 block discarded – undo
1343 1343
         $propertyAnnotations = $this->reader->getPropertyAnnotations($reflectionProperty);
1344 1344
 
1345 1345
         foreach ($propertyAnnotations as $key => $annot) {
1346
-            if (! is_numeric($key)) {
1346
+            if ( ! is_numeric($key)) {
1347 1347
                 continue;
1348 1348
             }
1349 1349
 
@@ -1361,7 +1361,7 @@  discard block
 block discarded – undo
1361 1361
         $methodAnnotations = $this->reader->getMethodAnnotations($reflectionMethod);
1362 1362
 
1363 1363
         foreach ($methodAnnotations as $key => $annot) {
1364
-            if (! is_numeric($key)) {
1364
+            if ( ! is_numeric($key)) {
1365 1365
                 continue;
1366 1366
             }
1367 1367
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Exporter/ClassMetadataExporter.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
         $lines[] = null;
30 30
 
31 31
         if ($namespace) {
32
-            $lines[] = 'namespace ' . $namespace . ';';
32
+            $lines[] = 'namespace '.$namespace.';';
33 33
             $lines[] = null;
34 34
         }
35 35
 
@@ -64,31 +64,31 @@  discard block
 block discarded – undo
64 64
     {
65 65
         $indentation     = str_repeat(self::INDENTATION, $indentationLevel);
66 66
         $bodyIndentation = str_repeat(self::INDENTATION, $indentationLevel + 1);
67
-        $objectReference = $bodyIndentation . self::VARIABLE;
67
+        $objectReference = $bodyIndentation.self::VARIABLE;
68 68
         $lines           = [];
69 69
 
70
-        $lines[] = $indentation . 'public function __construct(';
71
-        $lines[] = $bodyIndentation . 'ClassMetadataBuildingContext $metadataBuildingContext,';
72
-        $lines[] = $bodyIndentation . '?ClassMetadata $parent = null';
73
-        $lines[] = $indentation . ')';
74
-        $lines[] = $indentation . '{';
75
-        $lines[] = $bodyIndentation . 'parent::__construct("' . $metadata->getClassName() . '", $parent, $metadataBuildingContext);';
70
+        $lines[] = $indentation.'public function __construct(';
71
+        $lines[] = $bodyIndentation.'ClassMetadataBuildingContext $metadataBuildingContext,';
72
+        $lines[] = $bodyIndentation.'?ClassMetadata $parent = null';
73
+        $lines[] = $indentation.')';
74
+        $lines[] = $indentation.'{';
75
+        $lines[] = $bodyIndentation.'parent::__construct("'.$metadata->getClassName().'", $parent, $metadataBuildingContext);';
76 76
 
77 77
         if ($metadata->getCustomRepositoryClassName()) {
78 78
             $lines[] = null;
79
-            $lines[] = $objectReference . '->setCustomRepositoryClassName("' . $metadata->getCustomRepositoryClassName() . '");';
79
+            $lines[] = $objectReference.'->setCustomRepositoryClassName("'.$metadata->getCustomRepositoryClassName().'");';
80 80
         }
81 81
 
82 82
         if ($metadata->changeTrackingPolicy) {
83 83
             $lines[] = null;
84
-            $lines[] = $objectReference . '->setChangeTrackingPolicy(Mapping\ChangeTrackingPolicy::' . strtoupper($metadata->changeTrackingPolicy) . ');';
84
+            $lines[] = $objectReference.'->setChangeTrackingPolicy(Mapping\ChangeTrackingPolicy::'.strtoupper($metadata->changeTrackingPolicy).');';
85 85
         }
86 86
 
87 87
         $lines[] = $this->exportInheritance($metadata, $indentationLevel);
88 88
         $lines[] = $this->exportTable($metadata, $indentationLevel);
89 89
         $lines[] = $this->exportProperties($metadata, $indentationLevel);
90 90
         $lines[] = $this->exportLifecycleCallbacks($metadata, $indentationLevel);
91
-        $lines[] = $indentation . '}';
91
+        $lines[] = $indentation.'}';
92 92
 
93 93
         return implode(PHP_EOL, $lines);
94 94
     }
@@ -96,17 +96,17 @@  discard block
 block discarded – undo
96 96
     private function exportInheritance(Mapping\ClassMetadata $metadata, int $indentationLevel) : string
97 97
     {
98 98
         $bodyIndentation = str_repeat(self::INDENTATION, $indentationLevel + 1);
99
-        $objectReference = $bodyIndentation . self::VARIABLE;
99
+        $objectReference = $bodyIndentation.self::VARIABLE;
100 100
         $lines           = [];
101 101
 
102 102
         if ($metadata->inheritanceType) {
103 103
             $lines[] = null;
104
-            $lines[] = $objectReference . '->setInheritanceType(Mapping\InheritanceType::' . strtoupper($metadata->inheritanceType) . ');';
104
+            $lines[] = $objectReference.'->setInheritanceType(Mapping\InheritanceType::'.strtoupper($metadata->inheritanceType).');';
105 105
         }
106 106
 
107 107
         if ($metadata->discriminatorColumn) {
108 108
             $lines[] = null;
109
-            $lines[] = $bodyIndentation . '// Discriminator mapping';
109
+            $lines[] = $bodyIndentation.'// Discriminator mapping';
110 110
             $lines[] = $this->exportDiscriminatorMetadata($metadata, $indentationLevel + 1);
111 111
         }
112 112
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 
121 121
         if ($metadata->table) {
122 122
             $lines[] = null;
123
-            $lines[] = $bodyIndentation . '// Table';
123
+            $lines[] = $bodyIndentation.'// Table';
124 124
             $lines[] = $this->exportTableMetadata($metadata->table, $indentationLevel + 1);
125 125
         }
126 126
 
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 
135 135
         foreach ($metadata->getDeclaredPropertiesIterator() as $name => $property) {
136 136
             $lines[] = null;
137
-            $lines[] = $bodyIndentation . '// Property: ' . $name;
137
+            $lines[] = $bodyIndentation.'// Property: '.$name;
138 138
             $lines[] = $this->exportProperty($property, $indentationLevel + 1);
139 139
         }
140 140
 
@@ -144,16 +144,16 @@  discard block
 block discarded – undo
144 144
     private function exportLifecycleCallbacks(Mapping\ClassMetadata $metadata, int $indentationLevel) : string
145 145
     {
146 146
         $bodyIndentation = str_repeat(self::INDENTATION, $indentationLevel + 1);
147
-        $objectReference = $bodyIndentation . self::VARIABLE;
147
+        $objectReference = $bodyIndentation.self::VARIABLE;
148 148
         $lines           = [];
149 149
 
150 150
         if ($metadata->lifecycleCallbacks) {
151 151
             $lines[] = null;
152
-            $lines[] = $bodyIndentation . '// Lifecycle callbacks';
152
+            $lines[] = $bodyIndentation.'// Lifecycle callbacks';
153 153
 
154 154
             foreach ($metadata->lifecycleCallbacks as $event => $callbacks) {
155 155
                 foreach ($callbacks as $callback) {
156
-                    $lines[] = $objectReference . '->addLifecycleCallback("' . $callback . '", "' . $event . '");';
156
+                    $lines[] = $objectReference.'->addLifecycleCallback("'.$callback.'", "'.$event.'");';
157 157
                 }
158 158
             }
159 159
         }
@@ -166,17 +166,17 @@  discard block
 block discarded – undo
166 166
         $variableExporter      = new VariableExporter();
167 167
         $discriminatorExporter = new DiscriminatorColumnMetadataExporter();
168 168
         $indentation           = str_repeat(self::INDENTATION, $indentationLevel);
169
-        $objectReference       = $indentation . self::VARIABLE;
169
+        $objectReference       = $indentation.self::VARIABLE;
170 170
         $lines                 = [];
171 171
 
172 172
         $lines[] = $discriminatorExporter->export($metadata->discriminatorColumn, $indentationLevel);
173 173
         $lines[] = null;
174
-        $lines[] = $objectReference . '->setDiscriminatorColumn(' . $discriminatorExporter::VARIABLE . ');';
174
+        $lines[] = $objectReference.'->setDiscriminatorColumn('.$discriminatorExporter::VARIABLE.');';
175 175
 
176 176
         if ($metadata->discriminatorMap) {
177 177
             $discriminatorMap = $variableExporter->export($metadata->discriminatorMap, $indentationLevel + 1);
178 178
 
179
-            $lines[] = $objectReference . '->setDiscriminatorMap(' . $discriminatorMap . ');';
179
+            $lines[] = $objectReference.'->setDiscriminatorMap('.$discriminatorMap.');';
180 180
         }
181 181
 
182 182
         return implode(PHP_EOL, $lines);
@@ -186,12 +186,12 @@  discard block
 block discarded – undo
186 186
     {
187 187
         $tableExporter   = new TableMetadataExporter();
188 188
         $indentation     = str_repeat(self::INDENTATION, $indentationLevel);
189
-        $objectReference = $indentation . self::VARIABLE;
189
+        $objectReference = $indentation.self::VARIABLE;
190 190
         $lines           = [];
191 191
 
192 192
         $lines[] = $tableExporter->export($table, $indentationLevel);
193 193
         $lines[] = null;
194
-        $lines[] = $objectReference . '->setTable(' . $tableExporter::VARIABLE . ');';
194
+        $lines[] = $objectReference.'->setTable('.$tableExporter::VARIABLE.');';
195 195
 
196 196
         return implode(PHP_EOL, $lines);
197 197
     }
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
     private function exportProperty(Mapping\Property $property, int $indentationLevel) : string
200 200
     {
201 201
         $indentation     = str_repeat(self::INDENTATION, $indentationLevel);
202
-        $objectReference = $indentation . self::VARIABLE;
202
+        $objectReference = $indentation.self::VARIABLE;
203 203
         $lines           = [];
204 204
 
205 205
         switch (true) {
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
 
235 235
         $lines[] = $propertyExporter->export($property, $indentationLevel);
236 236
         $lines[] = null;
237
-        $lines[] = $objectReference . '->addProperty(' . $propertyExporter::VARIABLE . ');';
237
+        $lines[] = $objectReference.'->addProperty('.$propertyExporter::VARIABLE.');';
238 238
 
239 239
         return implode(PHP_EOL, $lines);
240 240
     }
Please login to merge, or discard this patch.