@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | { |
91 | 91 | $this->reader = $reader; |
92 | 92 | |
93 | - if (! $paths) { |
|
93 | + if ( ! $paths) { |
|
94 | 94 | return; |
95 | 95 | } |
96 | 96 | |
@@ -199,7 +199,7 @@ discard block |
||
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 |
||
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 |
||
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 | |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | foreach ($declared as $className) { |
248 | 248 | $rc = new \ReflectionClass($className); |
249 | 249 | $sourceFile = $rc->getFileName(); |
250 | - if (! in_array($sourceFile, $includedFiles, true) || $this->isTransient($className)) { |
|
250 | + if ( ! in_array($sourceFile, $includedFiles, true) || $this->isTransient($className)) { |
|
251 | 251 | continue; |
252 | 252 | } |
253 | 253 | |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | ) : Mapping\ClassMetadata { |
274 | 274 | $reflectionClass = $metadata->getReflectionClass(); |
275 | 275 | |
276 | - if (! $reflectionClass) { |
|
276 | + if ( ! $reflectionClass) { |
|
277 | 277 | // this happens when running annotation driver in combination with |
278 | 278 | // static reflection services. This is not the nicest fix |
279 | 279 | $reflectionClass = new \ReflectionClass($metadata->getClassName()); |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | $metadataBuildingContext |
311 | 311 | ); |
312 | 312 | |
313 | - if (! $property) { |
|
313 | + if ( ! $property) { |
|
314 | 314 | continue; |
315 | 315 | } |
316 | 316 | |
@@ -607,11 +607,11 @@ discard block |
||
607 | 607 | $assocMetadata->setOrphanRemoval($oneToOneAnnot->orphanRemoval); |
608 | 608 | $assocMetadata->setFetchMode($this->getFetchMode($className, $oneToOneAnnot->fetch)); |
609 | 609 | |
610 | - if (! empty($oneToOneAnnot->mappedBy)) { |
|
610 | + if ( ! empty($oneToOneAnnot->mappedBy)) { |
|
611 | 611 | $assocMetadata->setMappedBy($oneToOneAnnot->mappedBy); |
612 | 612 | } |
613 | 613 | |
614 | - if (! empty($oneToOneAnnot->inversedBy)) { |
|
614 | + if ( ! empty($oneToOneAnnot->inversedBy)) { |
|
615 | 615 | $assocMetadata->setInversedBy($oneToOneAnnot->inversedBy); |
616 | 616 | } |
617 | 617 | |
@@ -669,7 +669,7 @@ discard block |
||
669 | 669 | $assocMetadata->setCascade($this->getCascade($className, $fieldName, $manyToOneAnnot->cascade)); |
670 | 670 | $assocMetadata->setFetchMode($this->getFetchMode($className, $manyToOneAnnot->fetch)); |
671 | 671 | |
672 | - if (! empty($manyToOneAnnot->inversedBy)) { |
|
672 | + if ( ! empty($manyToOneAnnot->inversedBy)) { |
|
673 | 673 | $assocMetadata->setInversedBy($manyToOneAnnot->inversedBy); |
674 | 674 | } |
675 | 675 | |
@@ -728,11 +728,11 @@ discard block |
||
728 | 728 | $assocMetadata->setOrphanRemoval($oneToManyAnnot->orphanRemoval); |
729 | 729 | $assocMetadata->setFetchMode($this->getFetchMode($className, $oneToManyAnnot->fetch)); |
730 | 730 | |
731 | - if (! empty($oneToManyAnnot->mappedBy)) { |
|
731 | + if ( ! empty($oneToManyAnnot->mappedBy)) { |
|
732 | 732 | $assocMetadata->setMappedBy($oneToManyAnnot->mappedBy); |
733 | 733 | } |
734 | 734 | |
735 | - if (! empty($oneToManyAnnot->indexBy)) { |
|
735 | + if ( ! empty($oneToManyAnnot->indexBy)) { |
|
736 | 736 | $assocMetadata->setIndexedBy($oneToManyAnnot->indexBy); |
737 | 737 | } |
738 | 738 | |
@@ -775,15 +775,15 @@ discard block |
||
775 | 775 | $assocMetadata->setOrphanRemoval($manyToManyAnnot->orphanRemoval); |
776 | 776 | $assocMetadata->setFetchMode($this->getFetchMode($className, $manyToManyAnnot->fetch)); |
777 | 777 | |
778 | - if (! empty($manyToManyAnnot->mappedBy)) { |
|
778 | + if ( ! empty($manyToManyAnnot->mappedBy)) { |
|
779 | 779 | $assocMetadata->setMappedBy($manyToManyAnnot->mappedBy); |
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 |
||
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 |
||
858 | 858 | Annotation\Table $tableAnnot, |
859 | 859 | Mapping\TableMetadata $table |
860 | 860 | ) : Mapping\TableMetadata { |
861 | - if (! empty($tableAnnot->name)) { |
|
861 | + if ( ! empty($tableAnnot->name)) { |
|
862 | 862 | $table->setName($tableAnnot->name); |
863 | 863 | } |
864 | 864 | |
865 | - if (! empty($tableAnnot->schema)) { |
|
865 | + if ( ! empty($tableAnnot->schema)) { |
|
866 | 866 | $table->setSchema($tableAnnot->schema); |
867 | 867 | } |
868 | 868 | |
@@ -900,11 +900,11 @@ discard block |
||
900 | 900 | ) : Mapping\JoinTableMetadata { |
901 | 901 | $joinTable = new Mapping\JoinTableMetadata(); |
902 | 902 | |
903 | - if (! empty($joinTableAnnot->name)) { |
|
903 | + if ( ! empty($joinTableAnnot->name)) { |
|
904 | 904 | $joinTable->setName($joinTableAnnot->name); |
905 | 905 | } |
906 | 906 | |
907 | - if (! empty($joinTableAnnot->schema)) { |
|
907 | + if ( ! empty($joinTableAnnot->schema)) { |
|
908 | 908 | $joinTable->setSchema($joinTableAnnot->schema); |
909 | 909 | } |
910 | 910 | |
@@ -932,22 +932,22 @@ discard block |
||
932 | 932 | $joinColumn = new Mapping\JoinColumnMetadata(); |
933 | 933 | |
934 | 934 | // @todo Remove conditionals for name and referencedColumnName once naming strategy is brought into drivers |
935 | - if (! empty($joinColumnAnnot->name)) { |
|
935 | + if ( ! empty($joinColumnAnnot->name)) { |
|
936 | 936 | $joinColumn->setColumnName($joinColumnAnnot->name); |
937 | 937 | } |
938 | 938 | |
939 | - if (! empty($joinColumnAnnot->referencedColumnName)) { |
|
939 | + if ( ! empty($joinColumnAnnot->referencedColumnName)) { |
|
940 | 940 | $joinColumn->setReferencedColumnName($joinColumnAnnot->referencedColumnName); |
941 | 941 | } |
942 | 942 | |
943 | 943 | $joinColumn->setNullable($joinColumnAnnot->nullable); |
944 | 944 | $joinColumn->setUnique($joinColumnAnnot->unique); |
945 | 945 | |
946 | - if (! empty($joinColumnAnnot->fieldName)) { |
|
946 | + if ( ! empty($joinColumnAnnot->fieldName)) { |
|
947 | 947 | $joinColumn->setAliasedName($joinColumnAnnot->fieldName); |
948 | 948 | } |
949 | 949 | |
950 | - if (! empty($joinColumnAnnot->columnDefinition)) { |
|
950 | + if ( ! empty($joinColumnAnnot->columnDefinition)) { |
|
951 | 951 | $joinColumn->setColumnDefinition($joinColumnAnnot->columnDefinition); |
952 | 952 | } |
953 | 953 | |
@@ -969,7 +969,7 @@ discard block |
||
969 | 969 | $fieldName = null |
970 | 970 | ) : Mapping\CacheMetadata { |
971 | 971 | $baseRegion = strtolower(str_replace('\\', '_', $metadata->getRootClassName())); |
972 | - $defaultRegion = $baseRegion . ($fieldName ? '__' . $fieldName : ''); |
|
972 | + $defaultRegion = $baseRegion.($fieldName ? '__'.$fieldName : ''); |
|
973 | 973 | |
974 | 974 | $usage = constant(sprintf('%s::%s', Mapping\CacheUsage::class, $cacheAnnot->usage)); |
975 | 975 | $region = $cacheAnnot->region ?: $defaultRegion; |
@@ -1038,11 +1038,11 @@ discard block |
||
1038 | 1038 | $discriminatorColumn->setType(Type::getType($typeName)); |
1039 | 1039 | $discriminatorColumn->setColumnName($discriminatorColumnAnnotation->name); |
1040 | 1040 | |
1041 | - if (! empty($discriminatorColumnAnnotation->columnDefinition)) { |
|
1041 | + if ( ! empty($discriminatorColumnAnnotation->columnDefinition)) { |
|
1042 | 1042 | $discriminatorColumn->setColumnDefinition($discriminatorColumnAnnotation->columnDefinition); |
1043 | 1043 | } |
1044 | 1044 | |
1045 | - if (! empty($discriminatorColumnAnnotation->length)) { |
|
1045 | + if ( ! empty($discriminatorColumnAnnotation->length)) { |
|
1046 | 1046 | $discriminatorColumn->setLength($discriminatorColumnAnnotation->length); |
1047 | 1047 | } |
1048 | 1048 | } |
@@ -1050,7 +1050,7 @@ discard block |
||
1050 | 1050 | $metadata->setDiscriminatorColumn($discriminatorColumn); |
1051 | 1051 | |
1052 | 1052 | // Evaluate DiscriminatorMap annotation |
1053 | - if (! isset($classAnnotations[Annotation\DiscriminatorMap::class])) { |
|
1053 | + if ( ! isset($classAnnotations[Annotation\DiscriminatorMap::class])) { |
|
1054 | 1054 | return; |
1055 | 1055 | } |
1056 | 1056 | |
@@ -1069,7 +1069,7 @@ discard block |
||
1069 | 1069 | Mapping\ClassMetadata $metadata |
1070 | 1070 | ) : void { |
1071 | 1071 | // Evaluate @HasLifecycleCallbacks annotation |
1072 | - if (! isset($classAnnotations[Annotation\HasLifecycleCallbacks::class])) { |
|
1072 | + if ( ! isset($classAnnotations[Annotation\HasLifecycleCallbacks::class])) { |
|
1073 | 1073 | return; |
1074 | 1074 | } |
1075 | 1075 | |
@@ -1093,7 +1093,7 @@ discard block |
||
1093 | 1093 | Mapping\ClassMetadata $metadata |
1094 | 1094 | ) : void { |
1095 | 1095 | // Evaluate @EntityListeners annotation |
1096 | - if (! isset($classAnnotations[Annotation\EntityListeners::class])) { |
|
1096 | + if ( ! isset($classAnnotations[Annotation\EntityListeners::class])) { |
|
1097 | 1097 | return; |
1098 | 1098 | } |
1099 | 1099 | |
@@ -1101,7 +1101,7 @@ discard block |
||
1101 | 1101 | $entityListenersAnnot = $classAnnotations[Annotation\EntityListeners::class]; |
1102 | 1102 | |
1103 | 1103 | foreach ($entityListenersAnnot->value as $listenerClassName) { |
1104 | - if (! class_exists($listenerClassName)) { |
|
1104 | + if ( ! class_exists($listenerClassName)) { |
|
1105 | 1105 | throw Mapping\MappingException::entityListenerClassNotFound( |
1106 | 1106 | $listenerClassName, |
1107 | 1107 | $metadata->getClassName() |
@@ -1138,7 +1138,7 @@ discard block |
||
1138 | 1138 | $fieldName = $associationOverride->name; |
1139 | 1139 | $property = $metadata->getProperty($fieldName); |
1140 | 1140 | |
1141 | - if (! $property) { |
|
1141 | + if ( ! $property) { |
|
1142 | 1142 | throw Mapping\MappingException::invalidOverrideFieldName($metadata->getClassName(), $fieldName); |
1143 | 1143 | } |
1144 | 1144 | |
@@ -1172,7 +1172,7 @@ discard block |
||
1172 | 1172 | // Check for fetch |
1173 | 1173 | if ($associationOverride->fetch) { |
1174 | 1174 | $override->setFetchMode( |
1175 | - constant(Mapping\FetchMode::class . '::' . $associationOverride->fetch) |
|
1175 | + constant(Mapping\FetchMode::class.'::'.$associationOverride->fetch) |
|
1176 | 1176 | ); |
1177 | 1177 | } |
1178 | 1178 | |
@@ -1181,7 +1181,7 @@ discard block |
||
1181 | 1181 | } |
1182 | 1182 | |
1183 | 1183 | // Evaluate AttributeOverrides annotation |
1184 | - if (! isset($classAnnotations[Annotation\AttributeOverrides::class])) { |
|
1184 | + if ( ! isset($classAnnotations[Annotation\AttributeOverrides::class])) { |
|
1185 | 1185 | return; |
1186 | 1186 | } |
1187 | 1187 | |
@@ -1208,7 +1208,7 @@ discard block |
||
1208 | 1208 | Mapping\ClassMetadata $metadata |
1209 | 1209 | ) : void { |
1210 | 1210 | // Check for Cache |
1211 | - if (! isset($propertyAnnotations[Annotation\Cache::class])) { |
|
1211 | + if ( ! isset($propertyAnnotations[Annotation\Cache::class])) { |
|
1212 | 1212 | return; |
1213 | 1213 | } |
1214 | 1214 | |
@@ -1265,7 +1265,7 @@ discard block |
||
1265 | 1265 | { |
1266 | 1266 | $fetchModeConstant = sprintf('%s::%s', Mapping\FetchMode::class, $fetchMode); |
1267 | 1267 | |
1268 | - if (! defined($fetchModeConstant)) { |
|
1268 | + if ( ! defined($fetchModeConstant)) { |
|
1269 | 1269 | throw Mapping\MappingException::invalidFetchMode($className, $fetchMode); |
1270 | 1270 | } |
1271 | 1271 | |
@@ -1295,7 +1295,7 @@ discard block |
||
1295 | 1295 | $callbacks = []; |
1296 | 1296 | |
1297 | 1297 | foreach ($events as $eventName => $annotationClassName) { |
1298 | - if (! isset($annotations[$annotationClassName]) && $method->getName() !== $eventName) { |
|
1298 | + if ( ! isset($annotations[$annotationClassName]) && $method->getName() !== $eventName) { |
|
1299 | 1299 | continue; |
1300 | 1300 | } |
1301 | 1301 | |
@@ -1313,7 +1313,7 @@ discard block |
||
1313 | 1313 | $classAnnotations = $this->reader->getClassAnnotations($reflectionClass); |
1314 | 1314 | |
1315 | 1315 | foreach ($classAnnotations as $key => $annot) { |
1316 | - if (! is_numeric($key)) { |
|
1316 | + if ( ! is_numeric($key)) { |
|
1317 | 1317 | continue; |
1318 | 1318 | } |
1319 | 1319 | |
@@ -1331,7 +1331,7 @@ discard block |
||
1331 | 1331 | $propertyAnnotations = $this->reader->getPropertyAnnotations($reflectionProperty); |
1332 | 1332 | |
1333 | 1333 | foreach ($propertyAnnotations as $key => $annot) { |
1334 | - if (! is_numeric($key)) { |
|
1334 | + if ( ! is_numeric($key)) { |
|
1335 | 1335 | continue; |
1336 | 1336 | } |
1337 | 1337 | |
@@ -1349,7 +1349,7 @@ discard block |
||
1349 | 1349 | $methodAnnotations = $this->reader->getMethodAnnotations($reflectionMethod); |
1350 | 1350 | |
1351 | 1351 | foreach ($methodAnnotations as $key => $annot) { |
1352 | - if (! is_numeric($key)) { |
|
1352 | + if ( ! is_numeric($key)) { |
|
1353 | 1353 | continue; |
1354 | 1354 | } |
1355 | 1355 |
@@ -142,8 +142,8 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -343,7 +343,7 @@ discard block |
||
343 | 343 | } |
344 | 344 | |
345 | 345 | // We need to check for the columns here, because we might have associations as id as well. |
346 | - if (! $ids || count($primaryKeys) !== 1) { |
|
346 | + if ( ! $ids || count($primaryKeys) !== 1) { |
|
347 | 347 | return; |
348 | 348 | } |
349 | 349 | |
@@ -448,7 +448,7 @@ discard block |
||
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 |
||
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 | ); |
@@ -136,7 +136,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | |
@@ -960,7 +960,7 @@ discard block |
||
960 | 960 | $callbacks = []; |
961 | 961 | |
962 | 962 | foreach ($events as $eventName => $annotationClassName) { |
963 | - if (! isset($annotations[$annotationClassName]) && $method->getName() !== $eventName) { |
|
963 | + if ( ! isset($annotations[$annotationClassName]) && $method->getName() !== $eventName) { |
|
964 | 964 | continue; |
965 | 965 | } |
966 | 966 | |
@@ -984,7 +984,7 @@ discard block |
||
984 | 984 | { |
985 | 985 | $fetchModeConstant = sprintf('%s::%s', Mapping\FetchMode::class, $fetchMode); |
986 | 986 | |
987 | - if (! defined($fetchModeConstant)) { |
|
987 | + if ( ! defined($fetchModeConstant)) { |
|
988 | 988 | throw Mapping\MappingException::invalidFetchMode($className, $fetchMode); |
989 | 989 | } |
990 | 990 | |
@@ -1026,7 +1026,7 @@ discard block |
||
1026 | 1026 | $classAnnotations = $this->reader->getClassAnnotations($reflectionClass); |
1027 | 1027 | |
1028 | 1028 | foreach ($classAnnotations as $key => $annot) { |
1029 | - if (! is_numeric($key)) { |
|
1029 | + if ( ! is_numeric($key)) { |
|
1030 | 1030 | continue; |
1031 | 1031 | } |
1032 | 1032 | |
@@ -1044,7 +1044,7 @@ discard block |
||
1044 | 1044 | $propertyAnnotations = $this->reader->getPropertyAnnotations($reflectionProperty); |
1045 | 1045 | |
1046 | 1046 | foreach ($propertyAnnotations as $key => $annot) { |
1047 | - if (! is_numeric($key)) { |
|
1047 | + if ( ! is_numeric($key)) { |
|
1048 | 1048 | continue; |
1049 | 1049 | } |
1050 | 1050 | |
@@ -1062,7 +1062,7 @@ discard block |
||
1062 | 1062 | $methodAnnotations = $this->reader->getMethodAnnotations($reflectionMethod); |
1063 | 1063 | |
1064 | 1064 | foreach ($methodAnnotations as $key => $annot) { |
1065 | - if (! is_numeric($key)) { |
|
1065 | + if ( ! is_numeric($key)) { |
|
1066 | 1066 | continue; |
1067 | 1067 | } |
1068 | 1068 |
@@ -107,8 +107,8 @@ discard block |
||
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 |
||
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 | |
@@ -178,8 +178,8 @@ discard block |
||
178 | 178 | } |
179 | 179 | |
180 | 180 | foreach ($this->locator->getPaths() as $path) { |
181 | - $file = $path . '/' . $this->globalBasename . $this->locator->getFileExtension(); |
|
182 | - if (! is_file($file)) { |
|
181 | + $file = $path.'/'.$this->globalBasename.$this->locator->getFileExtension(); |
|
182 | + if ( ! is_file($file)) { |
|
183 | 183 | continue; |
184 | 184 | } |
185 | 185 |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | public function __construct(Reader $reader, $paths = null) |
92 | 92 | { |
93 | 93 | $this->reader = $reader; |
94 | - if (! $paths) { |
|
94 | + if ( ! $paths) { |
|
95 | 95 | return; |
96 | 96 | } |
97 | 97 | |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | return $this->classNames; |
202 | 202 | } |
203 | 203 | |
204 | - if (! $this->paths) { |
|
204 | + if ( ! $this->paths) { |
|
205 | 205 | throw Mapping\MappingException::pathRequired(); |
206 | 206 | } |
207 | 207 | |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | $includedFiles = []; |
210 | 210 | |
211 | 211 | foreach ($this->paths as $path) { |
212 | - if (! is_dir($path)) { |
|
212 | + if ( ! is_dir($path)) { |
|
213 | 213 | throw Mapping\MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path); |
214 | 214 | } |
215 | 215 | |
@@ -218,14 +218,14 @@ discard block |
||
218 | 218 | new \RecursiveDirectoryIterator($path, \FilesystemIterator::SKIP_DOTS), |
219 | 219 | \RecursiveIteratorIterator::LEAVES_ONLY |
220 | 220 | ), |
221 | - '/^.+' . preg_quote($this->fileExtension) . '$/i', |
|
221 | + '/^.+'.preg_quote($this->fileExtension).'$/i', |
|
222 | 222 | \RecursiveRegexIterator::GET_MATCH |
223 | 223 | ); |
224 | 224 | |
225 | 225 | foreach ($iterator as $file) { |
226 | 226 | $sourceFile = $file[0]; |
227 | 227 | |
228 | - if (! preg_match('(^phar:)i', $sourceFile)) { |
|
228 | + if ( ! preg_match('(^phar:)i', $sourceFile)) { |
|
229 | 229 | $sourceFile = realpath($sourceFile); |
230 | 230 | } |
231 | 231 | |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | foreach ($declared as $className) { |
250 | 250 | $rc = new \ReflectionClass($className); |
251 | 251 | $sourceFile = $rc->getFileName(); |
252 | - if (! in_array($sourceFile, $includedFiles, true) || $this->isTransient($className)) { |
|
252 | + if ( ! in_array($sourceFile, $includedFiles, true) || $this->isTransient($className)) { |
|
253 | 253 | continue; |
254 | 254 | } |
255 | 255 | |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | ) : Mapping\ClassMetadata { |
277 | 277 | $reflectionClass = $metadata->getReflectionClass(); |
278 | 278 | |
279 | - if (! $reflectionClass) { |
|
279 | + if ( ! $reflectionClass) { |
|
280 | 280 | // this happens when running annotation driver in combination with |
281 | 281 | // static reflection services. This is not the nicest fix |
282 | 282 | $reflectionClass = new \ReflectionClass($metadata->getClassName()); |
@@ -321,7 +321,7 @@ discard block |
||
321 | 321 | ); |
322 | 322 | } |
323 | 323 | |
324 | - if (! $property) { |
|
324 | + if ( ! $property) { |
|
325 | 325 | continue; |
326 | 326 | } |
327 | 327 | |
@@ -614,12 +614,12 @@ discard block |
||
614 | 614 | $assocMetadata->setOrphanRemoval($oneToOneAnnot->orphanRemoval); |
615 | 615 | $assocMetadata->setFetchMode($this->getFetchMode($className, $oneToOneAnnot->fetch)); |
616 | 616 | |
617 | - if (! empty($oneToOneAnnot->mappedBy)) { |
|
617 | + if ( ! empty($oneToOneAnnot->mappedBy)) { |
|
618 | 618 | $assocMetadata->setMappedBy($oneToOneAnnot->mappedBy); |
619 | 619 | $assocMetadata->setOwningSide(false); |
620 | 620 | } |
621 | 621 | |
622 | - if (! empty($oneToOneAnnot->inversedBy)) { |
|
622 | + if ( ! empty($oneToOneAnnot->inversedBy)) { |
|
623 | 623 | $assocMetadata->setInversedBy($oneToOneAnnot->inversedBy); |
624 | 624 | } |
625 | 625 | |
@@ -676,7 +676,7 @@ discard block |
||
676 | 676 | $assocMetadata->setCascade($this->getCascade($className, $fieldName, $manyToOneAnnot->cascade)); |
677 | 677 | $assocMetadata->setFetchMode($this->getFetchMode($className, $manyToOneAnnot->fetch)); |
678 | 678 | |
679 | - if (! empty($manyToOneAnnot->inversedBy)) { |
|
679 | + if ( ! empty($manyToOneAnnot->inversedBy)) { |
|
680 | 680 | $assocMetadata->setInversedBy($manyToOneAnnot->inversedBy); |
681 | 681 | } |
682 | 682 | |
@@ -736,7 +736,7 @@ discard block |
||
736 | 736 | $assocMetadata->setOwningSide(false); |
737 | 737 | $assocMetadata->setMappedBy($oneToManyAnnot->mappedBy); |
738 | 738 | |
739 | - if (! empty($oneToManyAnnot->indexBy)) { |
|
739 | + if ( ! empty($oneToManyAnnot->indexBy)) { |
|
740 | 740 | $assocMetadata->setIndexedBy($oneToManyAnnot->indexBy); |
741 | 741 | } |
742 | 742 | |
@@ -778,16 +778,16 @@ discard block |
||
778 | 778 | $assocMetadata->setOrphanRemoval($manyToManyAnnot->orphanRemoval); |
779 | 779 | $assocMetadata->setFetchMode($this->getFetchMode($className, $manyToManyAnnot->fetch)); |
780 | 780 | |
781 | - if (! empty($manyToManyAnnot->mappedBy)) { |
|
781 | + if ( ! empty($manyToManyAnnot->mappedBy)) { |
|
782 | 782 | $assocMetadata->setMappedBy($manyToManyAnnot->mappedBy); |
783 | 783 | $assocMetadata->setOwningSide(false); |
784 | 784 | } |
785 | 785 | |
786 | - if (! empty($manyToManyAnnot->inversedBy)) { |
|
786 | + if ( ! empty($manyToManyAnnot->inversedBy)) { |
|
787 | 787 | $assocMetadata->setInversedBy($manyToManyAnnot->inversedBy); |
788 | 788 | } |
789 | 789 | |
790 | - if (! empty($manyToManyAnnot->indexBy)) { |
|
790 | + if ( ! empty($manyToManyAnnot->indexBy)) { |
|
791 | 791 | $assocMetadata->setIndexedBy($manyToManyAnnot->indexBy); |
792 | 792 | } |
793 | 793 | |
@@ -831,15 +831,15 @@ discard block |
||
831 | 831 | |
832 | 832 | $fieldMetadata->setType(Type::getType($columnAnnot->type)); |
833 | 833 | |
834 | - if (! empty($columnAnnot->name)) { |
|
834 | + if ( ! empty($columnAnnot->name)) { |
|
835 | 835 | $fieldMetadata->setColumnName($columnAnnot->name); |
836 | 836 | } |
837 | 837 | |
838 | - if (! empty($columnAnnot->columnDefinition)) { |
|
838 | + if ( ! empty($columnAnnot->columnDefinition)) { |
|
839 | 839 | $fieldMetadata->setColumnDefinition($columnAnnot->columnDefinition); |
840 | 840 | } |
841 | 841 | |
842 | - if (! empty($columnAnnot->length)) { |
|
842 | + if ( ! empty($columnAnnot->length)) { |
|
843 | 843 | $fieldMetadata->setLength($columnAnnot->length); |
844 | 844 | } |
845 | 845 | |
@@ -862,11 +862,11 @@ discard block |
||
862 | 862 | Annotation\Table $tableAnnot, |
863 | 863 | Mapping\TableMetadata $tableMetadata |
864 | 864 | ) : void { |
865 | - if (! empty($tableAnnot->name)) { |
|
865 | + if ( ! empty($tableAnnot->name)) { |
|
866 | 866 | $tableMetadata->setName($tableAnnot->name); |
867 | 867 | } |
868 | 868 | |
869 | - if (! empty($tableAnnot->schema)) { |
|
869 | + if ( ! empty($tableAnnot->schema)) { |
|
870 | 870 | $tableMetadata->setSchema($tableAnnot->schema); |
871 | 871 | } |
872 | 872 | |
@@ -902,11 +902,11 @@ discard block |
||
902 | 902 | ) : Mapping\JoinTableMetadata { |
903 | 903 | $joinTable = new Mapping\JoinTableMetadata(); |
904 | 904 | |
905 | - if (! empty($joinTableAnnot->name)) { |
|
905 | + if ( ! empty($joinTableAnnot->name)) { |
|
906 | 906 | $joinTable->setName($joinTableAnnot->name); |
907 | 907 | } |
908 | 908 | |
909 | - if (! empty($joinTableAnnot->schema)) { |
|
909 | + if ( ! empty($joinTableAnnot->schema)) { |
|
910 | 910 | $joinTable->setSchema($joinTableAnnot->schema); |
911 | 911 | } |
912 | 912 | |
@@ -934,22 +934,22 @@ discard block |
||
934 | 934 | $joinColumn = new Mapping\JoinColumnMetadata(); |
935 | 935 | |
936 | 936 | // @todo Remove conditionals for name and referencedColumnName once naming strategy is brought into drivers |
937 | - if (! empty($joinColumnAnnot->name)) { |
|
937 | + if ( ! empty($joinColumnAnnot->name)) { |
|
938 | 938 | $joinColumn->setColumnName($joinColumnAnnot->name); |
939 | 939 | } |
940 | 940 | |
941 | - if (! empty($joinColumnAnnot->referencedColumnName)) { |
|
941 | + if ( ! empty($joinColumnAnnot->referencedColumnName)) { |
|
942 | 942 | $joinColumn->setReferencedColumnName($joinColumnAnnot->referencedColumnName); |
943 | 943 | } |
944 | 944 | |
945 | 945 | $joinColumn->setNullable($joinColumnAnnot->nullable); |
946 | 946 | $joinColumn->setUnique($joinColumnAnnot->unique); |
947 | 947 | |
948 | - if (! empty($joinColumnAnnot->fieldName)) { |
|
948 | + if ( ! empty($joinColumnAnnot->fieldName)) { |
|
949 | 949 | $joinColumn->setAliasedName($joinColumnAnnot->fieldName); |
950 | 950 | } |
951 | 951 | |
952 | - if (! empty($joinColumnAnnot->columnDefinition)) { |
|
952 | + if ( ! empty($joinColumnAnnot->columnDefinition)) { |
|
953 | 953 | $joinColumn->setColumnDefinition($joinColumnAnnot->columnDefinition); |
954 | 954 | } |
955 | 955 | |
@@ -971,7 +971,7 @@ discard block |
||
971 | 971 | $fieldName = null |
972 | 972 | ) : Mapping\CacheMetadata { |
973 | 973 | $baseRegion = strtolower(str_replace('\\', '_', $metadata->getRootClassName())); |
974 | - $defaultRegion = $baseRegion . ($fieldName ? '__' . $fieldName : ''); |
|
974 | + $defaultRegion = $baseRegion.($fieldName ? '__'.$fieldName : ''); |
|
975 | 975 | |
976 | 976 | $usage = constant(sprintf('%s::%s', Mapping\CacheUsage::class, $cacheAnnot->usage)); |
977 | 977 | $region = $cacheAnnot->region ?: $defaultRegion; |
@@ -993,7 +993,7 @@ discard block |
||
993 | 993 | if ($parent && $parent->inheritanceType === Mapping\InheritanceType::SINGLE_TABLE) { |
994 | 994 | // Handle the case where a middle mapped super class inherits from a single table inheritance tree. |
995 | 995 | do { |
996 | - if (! $parent->isMappedSuperclass) { |
|
996 | + if ( ! $parent->isMappedSuperclass) { |
|
997 | 997 | $metadata->setTable($parent->table); |
998 | 998 | |
999 | 999 | break; |
@@ -1048,11 +1048,11 @@ discard block |
||
1048 | 1048 | $discriminatorColumn->setType(Type::getType($typeName)); |
1049 | 1049 | $discriminatorColumn->setColumnName($discriminatorColumnAnnotation->name); |
1050 | 1050 | |
1051 | - if (! empty($discriminatorColumnAnnotation->columnDefinition)) { |
|
1051 | + if ( ! empty($discriminatorColumnAnnotation->columnDefinition)) { |
|
1052 | 1052 | $discriminatorColumn->setColumnDefinition($discriminatorColumnAnnotation->columnDefinition); |
1053 | 1053 | } |
1054 | 1054 | |
1055 | - if (! empty($discriminatorColumnAnnotation->length)) { |
|
1055 | + if ( ! empty($discriminatorColumnAnnotation->length)) { |
|
1056 | 1056 | $discriminatorColumn->setLength($discriminatorColumnAnnotation->length); |
1057 | 1057 | } |
1058 | 1058 | } |
@@ -1060,7 +1060,7 @@ discard block |
||
1060 | 1060 | $metadata->setDiscriminatorColumn($discriminatorColumn); |
1061 | 1061 | |
1062 | 1062 | // Evaluate DiscriminatorMap annotation |
1063 | - if (! isset($classAnnotations[Annotation\DiscriminatorMap::class])) { |
|
1063 | + if ( ! isset($classAnnotations[Annotation\DiscriminatorMap::class])) { |
|
1064 | 1064 | return; |
1065 | 1065 | } |
1066 | 1066 | |
@@ -1079,7 +1079,7 @@ discard block |
||
1079 | 1079 | Mapping\ClassMetadata $metadata |
1080 | 1080 | ) : void { |
1081 | 1081 | // Evaluate @HasLifecycleCallbacks annotation |
1082 | - if (! isset($classAnnotations[Annotation\HasLifecycleCallbacks::class])) { |
|
1082 | + if ( ! isset($classAnnotations[Annotation\HasLifecycleCallbacks::class])) { |
|
1083 | 1083 | return; |
1084 | 1084 | } |
1085 | 1085 | |
@@ -1103,7 +1103,7 @@ discard block |
||
1103 | 1103 | Mapping\ClassMetadata $metadata |
1104 | 1104 | ) : void { |
1105 | 1105 | // Evaluate @EntityListeners annotation |
1106 | - if (! isset($classAnnotations[Annotation\EntityListeners::class])) { |
|
1106 | + if ( ! isset($classAnnotations[Annotation\EntityListeners::class])) { |
|
1107 | 1107 | return; |
1108 | 1108 | } |
1109 | 1109 | |
@@ -1111,7 +1111,7 @@ discard block |
||
1111 | 1111 | $entityListenersAnnot = $classAnnotations[Annotation\EntityListeners::class]; |
1112 | 1112 | |
1113 | 1113 | foreach ($entityListenersAnnot->value as $listenerClassName) { |
1114 | - if (! class_exists($listenerClassName)) { |
|
1114 | + if ( ! class_exists($listenerClassName)) { |
|
1115 | 1115 | throw Mapping\MappingException::entityListenerClassNotFound( |
1116 | 1116 | $listenerClassName, |
1117 | 1117 | $metadata->getClassName() |
@@ -1147,7 +1147,7 @@ discard block |
||
1147 | 1147 | $fieldName = $associationOverride->name; |
1148 | 1148 | $property = $metadata->getProperty($fieldName); |
1149 | 1149 | |
1150 | - if (! $property) { |
|
1150 | + if ( ! $property) { |
|
1151 | 1151 | throw Mapping\MappingException::invalidOverrideFieldName($metadata->getClassName(), $fieldName); |
1152 | 1152 | } |
1153 | 1153 | |
@@ -1181,7 +1181,7 @@ discard block |
||
1181 | 1181 | // Check for fetch |
1182 | 1182 | if ($associationOverride->fetch) { |
1183 | 1183 | $override->setFetchMode( |
1184 | - constant(Mapping\FetchMode::class . '::' . $associationOverride->fetch) |
|
1184 | + constant(Mapping\FetchMode::class.'::'.$associationOverride->fetch) |
|
1185 | 1185 | ); |
1186 | 1186 | } |
1187 | 1187 | |
@@ -1190,7 +1190,7 @@ discard block |
||
1190 | 1190 | } |
1191 | 1191 | |
1192 | 1192 | // Evaluate AttributeOverrides annotation |
1193 | - if (! isset($classAnnotations[Annotation\AttributeOverrides::class])) { |
|
1193 | + if ( ! isset($classAnnotations[Annotation\AttributeOverrides::class])) { |
|
1194 | 1194 | return; |
1195 | 1195 | } |
1196 | 1196 | |
@@ -1217,7 +1217,7 @@ discard block |
||
1217 | 1217 | Mapping\ClassMetadata $metadata |
1218 | 1218 | ) : void { |
1219 | 1219 | // Check for Cache |
1220 | - if (! isset($propertyAnnotations[Annotation\Cache::class])) { |
|
1220 | + if ( ! isset($propertyAnnotations[Annotation\Cache::class])) { |
|
1221 | 1221 | return; |
1222 | 1222 | } |
1223 | 1223 | |
@@ -1274,7 +1274,7 @@ discard block |
||
1274 | 1274 | { |
1275 | 1275 | $fetchModeConstant = sprintf('%s::%s', Mapping\FetchMode::class, $fetchMode); |
1276 | 1276 | |
1277 | - if (! defined($fetchModeConstant)) { |
|
1277 | + if ( ! defined($fetchModeConstant)) { |
|
1278 | 1278 | throw Mapping\MappingException::invalidFetchMode($className, $fetchMode); |
1279 | 1279 | } |
1280 | 1280 | |
@@ -1304,7 +1304,7 @@ discard block |
||
1304 | 1304 | $callbacks = []; |
1305 | 1305 | |
1306 | 1306 | foreach ($events as $eventName => $annotationClassName) { |
1307 | - if (! isset($annotations[$annotationClassName]) && $method->getName() !== $eventName) { |
|
1307 | + if ( ! isset($annotations[$annotationClassName]) && $method->getName() !== $eventName) { |
|
1308 | 1308 | continue; |
1309 | 1309 | } |
1310 | 1310 | |
@@ -1322,7 +1322,7 @@ discard block |
||
1322 | 1322 | $classAnnotations = $this->reader->getClassAnnotations($reflectionClass); |
1323 | 1323 | |
1324 | 1324 | foreach ($classAnnotations as $key => $annot) { |
1325 | - if (! is_numeric($key)) { |
|
1325 | + if ( ! is_numeric($key)) { |
|
1326 | 1326 | continue; |
1327 | 1327 | } |
1328 | 1328 | |
@@ -1340,7 +1340,7 @@ discard block |
||
1340 | 1340 | $propertyAnnotations = $this->reader->getPropertyAnnotations($reflectionProperty); |
1341 | 1341 | |
1342 | 1342 | foreach ($propertyAnnotations as $key => $annot) { |
1343 | - if (! is_numeric($key)) { |
|
1343 | + if ( ! is_numeric($key)) { |
|
1344 | 1344 | continue; |
1345 | 1345 | } |
1346 | 1346 | |
@@ -1358,7 +1358,7 @@ discard block |
||
1358 | 1358 | $methodAnnotations = $this->reader->getMethodAnnotations($reflectionMethod); |
1359 | 1359 | |
1360 | 1360 | foreach ($methodAnnotations as $key => $annot) { |
1361 | - if (! is_numeric($key)) { |
|
1361 | + if ( ! is_numeric($key)) { |
|
1362 | 1362 | continue; |
1363 | 1363 | } |
1364 | 1364 |
@@ -413,7 +413,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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); |
@@ -643,14 +643,14 @@ discard block |
||
643 | 643 | } |
644 | 644 | |
645 | 645 | // Evaluate entity listener |
646 | - if (! isset($xmlRoot->{'entity-listeners'})) { |
|
646 | + if ( ! isset($xmlRoot->{'entity-listeners'})) { |
|
647 | 647 | return; |
648 | 648 | } |
649 | 649 | |
650 | 650 | foreach ($xmlRoot->{'entity-listeners'}->{'entity-listener'} as $listenerElement) { |
651 | 651 | $listenerClassName = (string) $listenerElement['class']; |
652 | 652 | |
653 | - if (! class_exists($listenerClassName)) { |
|
653 | + if ( ! class_exists($listenerClassName)) { |
|
654 | 654 | throw Mapping\MappingException::entityListenerClassNotFound( |
655 | 655 | $listenerClassName, |
656 | 656 | $metadata->getClassName() |
@@ -816,7 +816,7 @@ discard block |
||
816 | 816 | $fieldName = null |
817 | 817 | ) { |
818 | 818 | $baseRegion = strtolower(str_replace('\\', '_', $metadata->getRootClassName())); |
819 | - $defaultRegion = $baseRegion . ($fieldName ? '__' . $fieldName : ''); |
|
819 | + $defaultRegion = $baseRegion.($fieldName ? '__'.$fieldName : ''); |
|
820 | 820 | |
821 | 821 | $region = (string) ($cacheMapping['region'] ?? $defaultRegion); |
822 | 822 | $usage = isset($cacheMapping['usage']) |
@@ -845,7 +845,7 @@ discard block |
||
845 | 845 | Events::preFlush, |
846 | 846 | ]; |
847 | 847 | |
848 | - return array_filter($events, function ($eventName) use ($method) { |
|
848 | + return array_filter($events, function($eventName) use ($method) { |
|
849 | 849 | return $eventName === $method->getName(); |
850 | 850 | }); |
851 | 851 | } |
@@ -57,7 +57,7 @@ |
||
57 | 57 | { |
58 | 58 | parent::addDeclaredProperty($property); |
59 | 59 | |
60 | - if (! ($property instanceof VersionFieldMetadata)) { |
|
60 | + if ( ! ($property instanceof VersionFieldMetadata)) { |
|
61 | 61 | return; |
62 | 62 | } |
63 | 63 |
@@ -23,7 +23,7 @@ |
||
23 | 23 | { |
24 | 24 | parent::__clone(); |
25 | 25 | |
26 | - if (! $this->joinTable) { |
|
26 | + if ( ! $this->joinTable) { |
|
27 | 27 | return; |
28 | 28 | } |
29 | 29 |
@@ -243,7 +243,7 @@ |
||
243 | 243 | |
244 | 244 | public function __clone() |
245 | 245 | { |
246 | - if (! $this->cache) { |
|
246 | + if ( ! $this->cache) { |
|
247 | 247 | return; |
248 | 248 | } |
249 | 249 |