@@ -18,7 +18,7 @@ |
||
18 | 18 | |
19 | 19 | protected function getReflectionService() : ReflectionService |
20 | 20 | { |
21 | - if (! $this->reflectionService) { |
|
21 | + if ( ! $this->reflectionService) { |
|
22 | 22 | $this->reflectionService = new RuntimeReflectionService(); |
23 | 23 | } |
24 | 24 |
@@ -25,11 +25,11 @@ |
||
25 | 25 | /** @var FieldMetadata $value */ |
26 | 26 | $variableExporter = new VariableExporter(); |
27 | 27 | $indentation = str_repeat(self::INDENTATION, $indentationLevel); |
28 | - $objectReference = $indentation . self::VARIABLE; |
|
28 | + $objectReference = $indentation.self::VARIABLE; |
|
29 | 29 | |
30 | 30 | $lines = []; |
31 | 31 | $lines[] = parent::export($value, $indentationLevel); |
32 | - $lines[] = $objectReference . '->setVersioned(' . ltrim($variableExporter->export($value->isVersioned(), $indentationLevel + 1)) . ');'; |
|
32 | + $lines[] = $objectReference.'->setVersioned('.ltrim($variableExporter->export($value->isVersioned(), $indentationLevel + 1)).');'; |
|
33 | 33 | |
34 | 34 | return implode(PHP_EOL, $lines); |
35 | 35 | } |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | use function strtoupper; |
40 | 40 | use function unserialize; |
41 | 41 | |
42 | -require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php'; |
|
42 | +require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php'; |
|
43 | 43 | |
44 | 44 | class ClassMetadataTest extends OrmTestCase |
45 | 45 | { |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | */ |
183 | 183 | public function testMapAssociationInGlobalNamespace() : void |
184 | 184 | { |
185 | - require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php'; |
|
185 | + require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php'; |
|
186 | 186 | |
187 | 187 | $cm = new ClassMetadata(DoctrineGlobalArticle::class, null, $this->metadataBuildingContext); |
188 | 188 | $cm->setTable(new Mapping\TableMetadata('doctrine_global_article')); |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | */ |
279 | 279 | public function testSetDiscriminatorMapInGlobalNamespace() : void |
280 | 280 | { |
281 | - require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php'; |
|
281 | + require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php'; |
|
282 | 282 | |
283 | 283 | $cm = new ClassMetadata('DoctrineGlobalUser', null, $this->metadataBuildingContext); |
284 | 284 | $cm->setTable(new Mapping\TableMetadata('doctrine_global_user')); |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | */ |
295 | 295 | public function testSetSubClassesInGlobalNamespace() : void |
296 | 296 | { |
297 | - require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php'; |
|
297 | + require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php'; |
|
298 | 298 | |
299 | 299 | $cm = new ClassMetadata('DoctrineGlobalUser', null, $this->metadataBuildingContext); |
300 | 300 | $cm->setTable(new Mapping\TableMetadata('doctrine_global_user')); |
@@ -775,7 +775,7 @@ discard block |
||
775 | 775 | public function testEmptyFieldNameThrowsException() : void |
776 | 776 | { |
777 | 777 | $this->expectException(MappingException::class); |
778 | - $this->expectExceptionMessage("The field or association mapping misses the 'fieldName' attribute in entity '" . CMS\CmsUser::class . "'."); |
|
778 | + $this->expectExceptionMessage("The field or association mapping misses the 'fieldName' attribute in entity '".CMS\CmsUser::class."'."); |
|
779 | 779 | |
780 | 780 | $cm = new ClassMetadata(CMS\CmsUser::class, null, $this->metadataBuildingContext); |
781 | 781 | $cm->setTable(new Mapping\TableMetadata('cms_users')); |
@@ -825,7 +825,7 @@ discard block |
||
825 | 825 | $cm->addLifecycleCallback('postLoad', 'notfound'); |
826 | 826 | |
827 | 827 | $this->expectException(MappingException::class); |
828 | - $this->expectExceptionMessage("Entity '" . CMS\CmsUser::class . "' has no public method 'notfound' to be registered as lifecycle callback."); |
|
828 | + $this->expectExceptionMessage("Entity '".CMS\CmsUser::class."' has no public method 'notfound' to be registered as lifecycle callback."); |
|
829 | 829 | |
830 | 830 | $cm->validateLifecycleCallbacks(new RuntimeReflectionService()); |
831 | 831 | } |
@@ -845,7 +845,7 @@ discard block |
||
845 | 845 | $cm->addProperty($association); |
846 | 846 | |
847 | 847 | $this->expectException(MappingException::class); |
848 | - $this->expectExceptionMessage("The target-entity 'UnknownClass' cannot be found in '" . CMS\CmsUser::class . "#address'."); |
|
848 | + $this->expectExceptionMessage("The target-entity 'UnknownClass' cannot be found in '".CMS\CmsUser::class."#address'."); |
|
849 | 849 | |
850 | 850 | $cm->validateAssociations(); |
851 | 851 | } |
@@ -1089,6 +1089,6 @@ discard block |
||
1089 | 1089 | */ |
1090 | 1090 | public function propertyToColumnName(string $propertyName, ?string $className = null) : string |
1091 | 1091 | { |
1092 | - return strtolower($this->classToTableName($className)) . '_' . $propertyName; |
|
1092 | + return strtolower($this->classToTableName($className)).'_'.$propertyName; |
|
1093 | 1093 | } |
1094 | 1094 | } |
@@ -45,7 +45,7 @@ |
||
45 | 45 | /** @var Mapping\ClassMetadata $metadata */ |
46 | 46 | $metadata = $event->getClassMetadata(); |
47 | 47 | |
48 | - if (! isset($this->entityListeners[$metadata->getClassName()])) { |
|
48 | + if ( ! isset($this->entityListeners[$metadata->getClassName()])) { |
|
49 | 49 | return; |
50 | 50 | } |
51 | 51 |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | |
144 | 144 | $classNames = array_filter( |
145 | 145 | $this->locator->getAllClassNames(null), |
146 | - function ($className) { |
|
146 | + function($className) { |
|
147 | 147 | return ! $this->isTransient($className); |
148 | 148 | } |
149 | 149 | ); |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | ]; |
276 | 276 | |
277 | 277 | foreach ($entityListenersAnnot->value as $listenerClassName) { |
278 | - if (! class_exists($listenerClassName)) { |
|
278 | + if ( ! class_exists($listenerClassName)) { |
|
279 | 279 | throw Mapping\MappingException::entityListenerClassNotFound( |
280 | 280 | $listenerClassName, |
281 | 281 | $classMetadata->getClassName() |
@@ -341,15 +341,15 @@ discard block |
||
341 | 341 | |
342 | 342 | $discriminatorColumn->setColumnName($discriminatorColumnAnnot->name); |
343 | 343 | |
344 | - if (! empty($discriminatorColumnAnnot->columnDefinition)) { |
|
344 | + if ( ! empty($discriminatorColumnAnnot->columnDefinition)) { |
|
345 | 345 | $discriminatorColumn->setColumnDefinition($discriminatorColumnAnnot->columnDefinition); |
346 | 346 | } |
347 | 347 | |
348 | - if (! empty($discriminatorColumnAnnot->type)) { |
|
348 | + if ( ! empty($discriminatorColumnAnnot->type)) { |
|
349 | 349 | $discriminatorColumn->setType(Type::getType($discriminatorColumnAnnot->type)); |
350 | 350 | } |
351 | 351 | |
352 | - if (! empty($discriminatorColumnAnnot->length)) { |
|
352 | + if ( ! empty($discriminatorColumnAnnot->length)) { |
|
353 | 353 | $discriminatorColumn->setLength($discriminatorColumnAnnot->length); |
354 | 354 | } |
355 | 355 | } |
@@ -405,11 +405,11 @@ discard block |
||
405 | 405 | { |
406 | 406 | $table = new Mapping\TableMetadata(); |
407 | 407 | |
408 | - if (! empty($tableAnnot->name)) { |
|
408 | + if ( ! empty($tableAnnot->name)) { |
|
409 | 409 | $table->setName($tableAnnot->name); |
410 | 410 | } |
411 | 411 | |
412 | - if (! empty($tableAnnot->schema)) { |
|
412 | + if ( ! empty($tableAnnot->schema)) { |
|
413 | 413 | $table->setSchema($tableAnnot->schema); |
414 | 414 | } |
415 | 415 | |
@@ -453,7 +453,7 @@ discard block |
||
453 | 453 | ) { |
454 | 454 | $usage = constant(sprintf('%s::%s', Mapping\CacheUsage::class, $cacheAnnot->usage)); |
455 | 455 | $baseRegion = strtolower(str_replace('\\', '_', $metadata->getRootClassName())); |
456 | - $defaultRegion = $baseRegion . ($fieldName ? '__' . $fieldName : ''); |
|
456 | + $defaultRegion = $baseRegion.($fieldName ? '__'.$fieldName : ''); |
|
457 | 457 | |
458 | 458 | return new Mapping\CacheMetadata($usage, $cacheAnnot->region ?: $defaultRegion); |
459 | 459 | } |
@@ -562,11 +562,11 @@ discard block |
||
562 | 562 | $fieldMetadata->setPrimaryKey(true); |
563 | 563 | } |
564 | 564 | |
565 | - if (! empty($columnAnnot->columnDefinition)) { |
|
565 | + if ( ! empty($columnAnnot->columnDefinition)) { |
|
566 | 566 | $fieldMetadata->setColumnDefinition($columnAnnot->columnDefinition); |
567 | 567 | } |
568 | 568 | |
569 | - if (! empty($columnAnnot->length)) { |
|
569 | + if ( ! empty($columnAnnot->length)) { |
|
570 | 570 | $fieldMetadata->setLength($columnAnnot->length); |
571 | 571 | } |
572 | 572 | |
@@ -587,7 +587,7 @@ discard block |
||
587 | 587 | break; |
588 | 588 | |
589 | 589 | default: |
590 | - if (! isset($customOptions['default'])) { |
|
590 | + if ( ! isset($customOptions['default'])) { |
|
591 | 591 | throw Mapping\MappingException::unsupportedOptimisticLockingType($fieldMetadata->getType()); |
592 | 592 | } |
593 | 593 | } |
@@ -625,11 +625,11 @@ discard block |
||
625 | 625 | $assocMetadata->setOrphanRemoval($oneToOneAnnot->orphanRemoval); |
626 | 626 | $assocMetadata->setFetchMode($this->getFetchMode($className, $oneToOneAnnot->fetch)); |
627 | 627 | |
628 | - if (! empty($oneToOneAnnot->mappedBy)) { |
|
628 | + if ( ! empty($oneToOneAnnot->mappedBy)) { |
|
629 | 629 | $assocMetadata->setMappedBy($oneToOneAnnot->mappedBy); |
630 | 630 | } |
631 | 631 | |
632 | - if (! empty($oneToOneAnnot->inversedBy)) { |
|
632 | + if ( ! empty($oneToOneAnnot->inversedBy)) { |
|
633 | 633 | $assocMetadata->setInversedBy($oneToOneAnnot->inversedBy); |
634 | 634 | } |
635 | 635 | |
@@ -705,7 +705,7 @@ discard block |
||
705 | 705 | $assocMetadata->setCascade($this->getCascade($className, $fieldName, $manyToOneAnnot->cascade)); |
706 | 706 | $assocMetadata->setFetchMode($this->getFetchMode($className, $manyToOneAnnot->fetch)); |
707 | 707 | |
708 | - if (! empty($manyToOneAnnot->inversedBy)) { |
|
708 | + if ( ! empty($manyToOneAnnot->inversedBy)) { |
|
709 | 709 | $assocMetadata->setInversedBy($manyToOneAnnot->inversedBy); |
710 | 710 | } |
711 | 711 | |
@@ -782,11 +782,11 @@ discard block |
||
782 | 782 | $assocMetadata->setOrphanRemoval($oneToManyAnnot->orphanRemoval); |
783 | 783 | $assocMetadata->setFetchMode($this->getFetchMode($className, $oneToManyAnnot->fetch)); |
784 | 784 | |
785 | - if (! empty($oneToManyAnnot->mappedBy)) { |
|
785 | + if ( ! empty($oneToManyAnnot->mappedBy)) { |
|
786 | 786 | $assocMetadata->setMappedBy($oneToManyAnnot->mappedBy); |
787 | 787 | } |
788 | 788 | |
789 | - if (! empty($oneToManyAnnot->indexBy)) { |
|
789 | + if ( ! empty($oneToManyAnnot->indexBy)) { |
|
790 | 790 | $assocMetadata->setIndexedBy($oneToManyAnnot->indexBy); |
791 | 791 | } |
792 | 792 | |
@@ -840,15 +840,15 @@ discard block |
||
840 | 840 | $assocMetadata->setOrphanRemoval($manyToManyAnnot->orphanRemoval); |
841 | 841 | $assocMetadata->setFetchMode($this->getFetchMode($className, $manyToManyAnnot->fetch)); |
842 | 842 | |
843 | - if (! empty($manyToManyAnnot->mappedBy)) { |
|
843 | + if ( ! empty($manyToManyAnnot->mappedBy)) { |
|
844 | 844 | $assocMetadata->setMappedBy($manyToManyAnnot->mappedBy); |
845 | 845 | } |
846 | 846 | |
847 | - if (! empty($manyToManyAnnot->inversedBy)) { |
|
847 | + if ( ! empty($manyToManyAnnot->inversedBy)) { |
|
848 | 848 | $assocMetadata->setInversedBy($manyToManyAnnot->inversedBy); |
849 | 849 | } |
850 | 850 | |
851 | - if (! empty($manyToManyAnnot->indexBy)) { |
|
851 | + if ( ! empty($manyToManyAnnot->indexBy)) { |
|
852 | 852 | $assocMetadata->setIndexedBy($manyToManyAnnot->indexBy); |
853 | 853 | } |
854 | 854 | |
@@ -899,11 +899,11 @@ discard block |
||
899 | 899 | ) { |
900 | 900 | $joinTable = new Mapping\JoinTableMetadata(); |
901 | 901 | |
902 | - if (! empty($joinTableAnnot->name)) { |
|
902 | + if ( ! empty($joinTableAnnot->name)) { |
|
903 | 903 | $joinTable->setName($joinTableAnnot->name); |
904 | 904 | } |
905 | 905 | |
906 | - if (! empty($joinTableAnnot->schema)) { |
|
906 | + if ( ! empty($joinTableAnnot->schema)) { |
|
907 | 907 | $joinTable->setSchema($joinTableAnnot->schema); |
908 | 908 | } |
909 | 909 | |
@@ -954,11 +954,11 @@ discard block |
||
954 | 954 | $joinColumn->setNullable($joinColumnAnnot->nullable); |
955 | 955 | $joinColumn->setUnique($joinColumnAnnot->unique); |
956 | 956 | |
957 | - if (! empty($joinColumnAnnot->fieldName)) { |
|
957 | + if ( ! empty($joinColumnAnnot->fieldName)) { |
|
958 | 958 | $joinColumn->setAliasedName($joinColumnAnnot->fieldName); |
959 | 959 | } |
960 | 960 | |
961 | - if (! empty($joinColumnAnnot->columnDefinition)) { |
|
961 | + if ( ! empty($joinColumnAnnot->columnDefinition)) { |
|
962 | 962 | $joinColumn->setColumnDefinition($joinColumnAnnot->columnDefinition); |
963 | 963 | } |
964 | 964 | |
@@ -1014,7 +1014,7 @@ discard block |
||
1014 | 1014 | { |
1015 | 1015 | $fetchModeConstant = sprintf('%s::%s', Mapping\FetchMode::class, $fetchMode); |
1016 | 1016 | |
1017 | - if (! defined($fetchModeConstant)) { |
|
1017 | + if ( ! defined($fetchModeConstant)) { |
|
1018 | 1018 | throw Mapping\MappingException::invalidFetchMode($className, $fetchMode); |
1019 | 1019 | } |
1020 | 1020 | |
@@ -1056,7 +1056,7 @@ discard block |
||
1056 | 1056 | $classAnnotations = $this->reader->getClassAnnotations($reflectionClass); |
1057 | 1057 | |
1058 | 1058 | foreach ($classAnnotations as $key => $annot) { |
1059 | - if (! is_numeric($key)) { |
|
1059 | + if ( ! is_numeric($key)) { |
|
1060 | 1060 | continue; |
1061 | 1061 | } |
1062 | 1062 | |
@@ -1074,7 +1074,7 @@ discard block |
||
1074 | 1074 | $propertyAnnotations = $this->reader->getPropertyAnnotations($reflectionProperty); |
1075 | 1075 | |
1076 | 1076 | foreach ($propertyAnnotations as $key => $annot) { |
1077 | - if (! is_numeric($key)) { |
|
1077 | + if ( ! is_numeric($key)) { |
|
1078 | 1078 | continue; |
1079 | 1079 | } |
1080 | 1080 | |
@@ -1092,7 +1092,7 @@ discard block |
||
1092 | 1092 | $methodAnnotations = $this->reader->getMethodAnnotations($reflectionMethod); |
1093 | 1093 | |
1094 | 1094 | foreach ($methodAnnotations as $key => $annot) { |
1095 | - if (! is_numeric($key)) { |
|
1095 | + if ( ! is_numeric($key)) { |
|
1096 | 1096 | continue; |
1097 | 1097 | } |
1098 | 1098 |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | */ |
24 | 24 | public static function pathRequired() |
25 | 25 | { |
26 | - return new self('Specifying the paths to your entities is required ' . |
|
26 | + return new self('Specifying the paths to your entities is required '. |
|
27 | 27 | 'in the AnnotationDriver to retrieve all class names.'); |
28 | 28 | } |
29 | 29 | |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | */ |
214 | 214 | public static function missingQueryMapping($entity, $queryName) |
215 | 215 | { |
216 | - return new self('Query named "' . $queryName . '" in "' . $entity . ' requires a result class or result set mapping.'); |
|
216 | + return new self('Query named "'.$queryName.'" in "'.$entity.' requires a result class or result set mapping.'); |
|
217 | 217 | } |
218 | 218 | |
219 | 219 | /** |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | */ |
225 | 225 | public static function missingResultSetMappingEntity($entity, $resultName) |
226 | 226 | { |
227 | - return new self('Result set mapping named "' . $resultName . '" in "' . $entity . ' requires a entity class name.'); |
|
227 | + return new self('Result set mapping named "'.$resultName.'" in "'.$entity.' requires a entity class name.'); |
|
228 | 228 | } |
229 | 229 | |
230 | 230 | /** |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | */ |
236 | 236 | public static function missingResultSetMappingFieldName($entity, $resultName) |
237 | 237 | { |
238 | - return new self('Result set mapping named "' . $resultName . '" in "' . $entity . ' requires a field name.'); |
|
238 | + return new self('Result set mapping named "'.$resultName.'" in "'.$entity.' requires a field name.'); |
|
239 | 239 | } |
240 | 240 | |
241 | 241 | /** |
@@ -282,8 +282,8 @@ discard block |
||
282 | 282 | { |
283 | 283 | $message = sprintf("The mapping of field '%s' is invalid: The option '%s' is required.", $field, $expectedOption); |
284 | 284 | |
285 | - if (! empty($hint)) { |
|
286 | - $message .= ' (Hint: ' . $hint . ')'; |
|
285 | + if ( ! empty($hint)) { |
|
286 | + $message .= ' (Hint: '.$hint.')'; |
|
287 | 287 | } |
288 | 288 | |
289 | 289 | return new self($message); |
@@ -312,7 +312,7 @@ discard block |
||
312 | 312 | */ |
313 | 313 | public static function reflectionFailure($entity, ReflectionException $previousException) |
314 | 314 | { |
315 | - return new self('An error occurred in ' . $entity, 0, $previousException); |
|
315 | + return new self('An error occurred in '.$entity, 0, $previousException); |
|
316 | 316 | } |
317 | 317 | |
318 | 318 | /** |
@@ -323,8 +323,8 @@ discard block |
||
323 | 323 | */ |
324 | 324 | public static function joinColumnMustPointToMappedField($className, $joinColumn) |
325 | 325 | { |
326 | - return new self('The column ' . $joinColumn . ' must be mapped to a field in class ' |
|
327 | - . $className . ' since it is referenced by a join column of another class.'); |
|
326 | + return new self('The column '.$joinColumn.' must be mapped to a field in class ' |
|
327 | + . $className.' since it is referenced by a join column of another class.'); |
|
328 | 328 | } |
329 | 329 | |
330 | 330 | /** |
@@ -358,7 +358,7 @@ discard block |
||
358 | 358 | */ |
359 | 359 | public static function propertyTypeIsRequired($className, $propertyName) |
360 | 360 | { |
361 | - return new self("The attribute 'type' is required for the column description of property " . $className . '::$' . $propertyName . '.'); |
|
361 | + return new self("The attribute 'type' is required for the column description of property ".$className.'::$'.$propertyName.'.'); |
|
362 | 362 | } |
363 | 363 | |
364 | 364 | /** |
@@ -368,7 +368,7 @@ discard block |
||
368 | 368 | */ |
369 | 369 | public static function tableIdGeneratorNotImplemented($className) |
370 | 370 | { |
371 | - return new self('TableIdGenerator is not yet implemented for use with class ' . $className); |
|
371 | + return new self('TableIdGenerator is not yet implemented for use with class '.$className); |
|
372 | 372 | } |
373 | 373 | |
374 | 374 | /** |
@@ -394,7 +394,7 @@ discard block |
||
394 | 394 | */ |
395 | 395 | public static function duplicateQueryMapping($entity, $queryName) |
396 | 396 | { |
397 | - return new self('Query named "' . $queryName . '" in "' . $entity . '" was already declared, but it must be declared only once'); |
|
397 | + return new self('Query named "'.$queryName.'" in "'.$entity.'" was already declared, but it must be declared only once'); |
|
398 | 398 | } |
399 | 399 | |
400 | 400 | /** |
@@ -405,7 +405,7 @@ discard block |
||
405 | 405 | */ |
406 | 406 | public static function duplicateResultSetMapping($entity, $resultName) |
407 | 407 | { |
408 | - return new self('Result set mapping named "' . $resultName . '" in "' . $entity . '" was already declared, but it must be declared only once'); |
|
408 | + return new self('Result set mapping named "'.$resultName.'" in "'.$entity.'" was already declared, but it must be declared only once'); |
|
409 | 409 | } |
410 | 410 | |
411 | 411 | /** |
@@ -415,7 +415,7 @@ discard block |
||
415 | 415 | */ |
416 | 416 | public static function singleIdNotAllowedOnCompositePrimaryKey($entity) |
417 | 417 | { |
418 | - return new self('Single id is not allowed on composite primary key in entity ' . $entity); |
|
418 | + return new self('Single id is not allowed on composite primary key in entity '.$entity); |
|
419 | 419 | } |
420 | 420 | |
421 | 421 | /** |
@@ -425,7 +425,7 @@ discard block |
||
425 | 425 | */ |
426 | 426 | public static function noIdDefined($entity) |
427 | 427 | { |
428 | - return new self('No ID defined for entity ' . $entity); |
|
428 | + return new self('No ID defined for entity '.$entity); |
|
429 | 429 | } |
430 | 430 | |
431 | 431 | /** |
@@ -435,7 +435,7 @@ discard block |
||
435 | 435 | */ |
436 | 436 | public static function unsupportedOptimisticLockingType($unsupportedType) |
437 | 437 | { |
438 | - return new self('Locking type "' . $unsupportedType->getName() . '" is not supported by Doctrine.'); |
|
438 | + return new self('Locking type "'.$unsupportedType->getName().'" is not supported by Doctrine.'); |
|
439 | 439 | } |
440 | 440 | |
441 | 441 | /** |
@@ -445,13 +445,13 @@ discard block |
||
445 | 445 | */ |
446 | 446 | public static function fileMappingDriversRequireConfiguredDirectoryPath($path = null) |
447 | 447 | { |
448 | - if (! empty($path)) { |
|
449 | - $path = '[' . $path . ']'; |
|
448 | + if ( ! empty($path)) { |
|
449 | + $path = '['.$path.']'; |
|
450 | 450 | } |
451 | 451 | |
452 | 452 | return new self( |
453 | - 'File mapping drivers must have a valid directory path, ' . |
|
454 | - 'however the given path ' . $path . ' seems to be incorrect!' |
|
453 | + 'File mapping drivers must have a valid directory path, '. |
|
454 | + 'however the given path '.$path.' seems to be incorrect!' |
|
455 | 455 | ); |
456 | 456 | } |
457 | 457 | |
@@ -467,7 +467,7 @@ discard block |
||
467 | 467 | public static function invalidClassInDiscriminatorMap($className, $owningClass) |
468 | 468 | { |
469 | 469 | return new self(sprintf( |
470 | - "Entity class '%s' used in the discriminator map of class '%s' " . |
|
470 | + "Entity class '%s' used in the discriminator map of class '%s' ". |
|
471 | 471 | 'does not exist.', |
472 | 472 | $className, |
473 | 473 | $owningClass |
@@ -533,7 +533,7 @@ discard block |
||
533 | 533 | public static function sqlConversionNotAllowedForPrimaryKeyProperties($className, Property $property) |
534 | 534 | { |
535 | 535 | return new self(sprintf( |
536 | - 'It is not possible to set id field "%s" to type "%s" in entity class "%s". ' . |
|
536 | + 'It is not possible to set id field "%s" to type "%s" in entity class "%s". '. |
|
537 | 537 | 'The type "%s" requires conversion SQL which is not allowed for identifiers.', |
538 | 538 | $property->getName(), |
539 | 539 | $property->getTypeName(), |
@@ -569,7 +569,7 @@ discard block |
||
569 | 569 | */ |
570 | 570 | public static function duplicateColumnName($className, $columnName) |
571 | 571 | { |
572 | - return new self("Duplicate definition of column '" . $columnName . "' on entity '" . $className . "' in a field or discriminator column mapping."); |
|
572 | + return new self("Duplicate definition of column '".$columnName."' on entity '".$className."' in a field or discriminator column mapping."); |
|
573 | 573 | } |
574 | 574 | |
575 | 575 | /** |
@@ -580,7 +580,7 @@ discard block |
||
580 | 580 | */ |
581 | 581 | public static function illegalToManyAssociationOnMappedSuperclass($className, $field) |
582 | 582 | { |
583 | - return new self("It is illegal to put an inverse side one-to-many or many-to-many association on mapped superclass '" . $className . '#' . $field . "'."); |
|
583 | + return new self("It is illegal to put an inverse side one-to-many or many-to-many association on mapped superclass '".$className.'#'.$field."'."); |
|
584 | 584 | } |
585 | 585 | |
586 | 586 | /** |
@@ -592,8 +592,8 @@ discard block |
||
592 | 592 | */ |
593 | 593 | public static function cannotMapCompositePrimaryKeyEntitiesAsForeignId($className, $targetEntity, $targetField) |
594 | 594 | { |
595 | - return new self("It is not possible to map entity '" . $className . "' with a composite primary key " . |
|
596 | - "as part of the primary key of another entity '" . $targetEntity . '#' . $targetField . "'."); |
|
595 | + return new self("It is not possible to map entity '".$className."' with a composite primary key ". |
|
596 | + "as part of the primary key of another entity '".$targetEntity.'#'.$targetField."'."); |
|
597 | 597 | } |
598 | 598 | |
599 | 599 | /** |
@@ -647,8 +647,8 @@ discard block |
||
647 | 647 | */ |
648 | 648 | public static function illegalOrphanRemoval($className, $field) |
649 | 649 | { |
650 | - return new self('Orphan removal is only allowed on one-to-one and one-to-many ' . |
|
651 | - 'associations, but ' . $className . '#' . $field . ' is not.'); |
|
650 | + return new self('Orphan removal is only allowed on one-to-one and one-to-many '. |
|
651 | + 'associations, but '.$className.'#'.$field.' is not.'); |
|
652 | 652 | } |
653 | 653 | |
654 | 654 | /** |
@@ -680,7 +680,7 @@ discard block |
||
680 | 680 | */ |
681 | 681 | public static function noInheritanceOnMappedSuperClass($className) |
682 | 682 | { |
683 | - return new self("It is not supported to define inheritance information on a mapped superclass '" . $className . "'."); |
|
683 | + return new self("It is not supported to define inheritance information on a mapped superclass '".$className."'."); |
|
684 | 684 | } |
685 | 685 | |
686 | 686 | /** |
@@ -692,8 +692,8 @@ discard block |
||
692 | 692 | public static function mappedClassNotPartOfDiscriminatorMap($className, $rootClassName) |
693 | 693 | { |
694 | 694 | return new self( |
695 | - "Entity '" . $className . "' has to be part of the discriminator map of '" . $rootClassName . "' " . |
|
696 | - "to be properly mapped in the inheritance hierarchy. Alternatively you can make '" . $className . "' an abstract class " . |
|
695 | + "Entity '".$className."' has to be part of the discriminator map of '".$rootClassName."' ". |
|
696 | + "to be properly mapped in the inheritance hierarchy. Alternatively you can make '".$className."' an abstract class ". |
|
697 | 697 | 'to avoid this exception from occurring.' |
698 | 698 | ); |
699 | 699 | } |
@@ -706,7 +706,7 @@ discard block |
||
706 | 706 | */ |
707 | 707 | public static function lifecycleCallbackMethodNotFound($className, $methodName) |
708 | 708 | { |
709 | - return new self("Entity '" . $className . "' has no public method '" . $methodName . "' to be registered as lifecycle callback."); |
|
709 | + return new self("Entity '".$className."' has no public method '".$methodName."' to be registered as lifecycle callback."); |
|
710 | 710 | } |
711 | 711 | |
712 | 712 | /** |
@@ -740,7 +740,7 @@ discard block |
||
740 | 740 | */ |
741 | 741 | public static function invalidFetchMode($className, $annotation) |
742 | 742 | { |
743 | - return new self("Entity '" . $className . "' has a mapping with invalid fetch mode '" . $annotation . "'"); |
|
743 | + return new self("Entity '".$className."' has a mapping with invalid fetch mode '".$annotation."'"); |
|
744 | 744 | } |
745 | 745 | |
746 | 746 | /** |
@@ -750,7 +750,7 @@ discard block |
||
750 | 750 | */ |
751 | 751 | public static function compositeKeyAssignedIdGeneratorRequired($className) |
752 | 752 | { |
753 | - return new self("Entity '" . $className . "' has a composite identifier but uses an ID generator other than manually assigning (Identity, Sequence). This is not supported."); |
|
753 | + return new self("Entity '".$className."' has a composite identifier but uses an ID generator other than manually assigning (Identity, Sequence). This is not supported."); |
|
754 | 754 | } |
755 | 755 | |
756 | 756 | /** |
@@ -762,7 +762,7 @@ discard block |
||
762 | 762 | */ |
763 | 763 | public static function invalidTargetEntityClass($targetEntity, $sourceEntity, $associationName) |
764 | 764 | { |
765 | - return new self("The target-entity '" . $targetEntity . "' cannot be found in '" . $sourceEntity . '#' . $associationName . "'."); |
|
765 | + return new self("The target-entity '".$targetEntity."' cannot be found in '".$sourceEntity.'#'.$associationName."'."); |
|
766 | 766 | } |
767 | 767 | |
768 | 768 | /** |
@@ -774,8 +774,8 @@ discard block |
||
774 | 774 | */ |
775 | 775 | public static function invalidCascadeOption(array $cascades, $className, $propertyName) |
776 | 776 | { |
777 | - $cascades = implode(', ', array_map(static function ($e) { |
|
778 | - return "'" . $e . "'"; |
|
777 | + $cascades = implode(', ', array_map(static function($e) { |
|
778 | + return "'".$e."'"; |
|
779 | 779 | }, $cascades)); |
780 | 780 | |
781 | 781 | return new self(sprintf( |
@@ -808,7 +808,7 @@ discard block |
||
808 | 808 | { |
809 | 809 | return new self( |
810 | 810 | sprintf( |
811 | - 'Infinite nesting detected for embedded property %s::%s. ' . |
|
811 | + 'Infinite nesting detected for embedded property %s::%s. '. |
|
812 | 812 | 'You cannot embed an embeddable from the same type inside an embeddable.', |
813 | 813 | $className, |
814 | 814 | $propertyName |
@@ -823,7 +823,7 @@ discard block |
||
823 | 823 | { |
824 | 824 | return new self( |
825 | 825 | sprintf( |
826 | - 'Class %s not found in namespaces %s.' . |
|
826 | + 'Class %s not found in namespaces %s.'. |
|
827 | 827 | $className, |
828 | 828 | implode(', ', $namespaces) |
829 | 829 | ) |
@@ -54,11 +54,11 @@ |
||
54 | 54 | return $tableMetadata; |
55 | 55 | } |
56 | 56 | |
57 | - if (! empty($this->tableAnnotation->name)) { |
|
57 | + if ( ! empty($this->tableAnnotation->name)) { |
|
58 | 58 | $tableMetadata->setName($this->tableAnnotation->name); |
59 | 59 | } |
60 | 60 | |
61 | - if (! empty($this->tableAnnotation->schema)) { |
|
61 | + if ( ! empty($this->tableAnnotation->schema)) { |
|
62 | 62 | $tableMetadata->setSchema($this->tableAnnotation->schema); |
63 | 63 | } |
64 | 64 |
@@ -61,7 +61,7 @@ |
||
61 | 61 | |
62 | 62 | $componentName = $this->componentMetadata->getRootClassName(); |
63 | 63 | $baseRegion = strtolower(str_replace('\\', '_', $componentName)); |
64 | - $defaultRegion = $baseRegion . ($this->fieldName ? '__' . $this->fieldName : ''); |
|
64 | + $defaultRegion = $baseRegion.($this->fieldName ? '__'.$this->fieldName : ''); |
|
65 | 65 | |
66 | 66 | $usage = constant(sprintf('%s::%s', Mapping\CacheUsage::class, strtoupper($this->cacheAnnotation->usage))); |
67 | 67 | $region = $this->cacheAnnotation->region ?: $defaultRegion; |
@@ -65,11 +65,11 @@ |
||
65 | 65 | $discriminatorColumn->setType(Type::getType($annotation->type ?? 'string')); |
66 | 66 | $discriminatorColumn->setColumnName($annotation->name); |
67 | 67 | |
68 | - if (! empty($annotation->columnDefinition)) { |
|
68 | + if ( ! empty($annotation->columnDefinition)) { |
|
69 | 69 | $discriminatorColumn->setColumnDefinition($annotation->columnDefinition); |
70 | 70 | } |
71 | 71 | |
72 | - if (! empty($annotation->length)) { |
|
72 | + if ( ! empty($annotation->length)) { |
|
73 | 73 | $discriminatorColumn->setLength($annotation->length); |
74 | 74 | } |
75 | 75 |