@@ -99,7 +99,7 @@ |
||
99 | 99 | assert($this->fieldName !== null); |
100 | 100 | assert($this->fieldType !== null); |
101 | 101 | |
102 | - if (! $this->generatedValueAnnotation) { |
|
102 | + if ( ! $this->generatedValueAnnotation) { |
|
103 | 103 | return null; |
104 | 104 | } |
105 | 105 |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | */ |
131 | 131 | public function isTransient($className) : bool |
132 | 132 | { |
133 | - if (! $this->initialized) { |
|
133 | + if ( ! $this->initialized) { |
|
134 | 134 | $this->initialize(); |
135 | 135 | } |
136 | 136 | |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | */ |
179 | 179 | public function getAllMetadata() : array |
180 | 180 | { |
181 | - if (! $this->initialized) { |
|
181 | + if ( ! $this->initialized) { |
|
182 | 182 | $this->initialize(); |
183 | 183 | } |
184 | 184 | |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | |
215 | 215 | public function getTargetPlatform() : Platforms\AbstractPlatform |
216 | 216 | { |
217 | - if (! $this->targetPlatform) { |
|
217 | + if ( ! $this->targetPlatform) { |
|
218 | 218 | $this->targetPlatform = $this->em->getConnection()->getDatabasePlatform(); |
219 | 219 | } |
220 | 220 | |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | |
257 | 257 | try { |
258 | 258 | if ($this->cacheDriver) { |
259 | - $cached = $this->cacheDriver->fetch($entityClassName . $this->cacheSalt); |
|
259 | + $cached = $this->cacheDriver->fetch($entityClassName.$this->cacheSalt); |
|
260 | 260 | |
261 | 261 | if ($cached instanceof ClassMetadata) { |
262 | 262 | $this->loadedMetadata[$entityClassName] = $cached; |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | foreach ($this->loadMetadata($entityClassName, $metadataBuildingContext) as $loadedClass) { |
267 | 267 | $loadedClassName = $loadedClass->getClassName(); |
268 | 268 | |
269 | - $this->cacheDriver->save($loadedClassName . $this->cacheSalt, $loadedClass, null); |
|
269 | + $this->cacheDriver->save($loadedClassName.$this->cacheSalt, $loadedClass, null); |
|
270 | 270 | } |
271 | 271 | } |
272 | 272 | } else { |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | } catch (PersistenceMappingException $loadingException) { |
276 | 276 | $fallbackMetadataResponse = $this->onNotFoundMetadata($entityClassName, $metadataBuildingContext); |
277 | 277 | |
278 | - if (! $fallbackMetadataResponse) { |
|
278 | + if ( ! $fallbackMetadataResponse) { |
|
279 | 279 | throw $loadingException; |
280 | 280 | } |
281 | 281 | |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | */ |
312 | 312 | protected function loadMetadata(string $name, ClassMetadataBuildingContext $metadataBuildingContext) : array |
313 | 313 | { |
314 | - if (! $this->initialized) { |
|
314 | + if ( ! $this->initialized) { |
|
315 | 315 | $this->initialize(); |
316 | 316 | } |
317 | 317 | |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | $parentClasses = []; |
358 | 358 | |
359 | 359 | foreach (array_reverse($this->getReflectionService()->getParentClasses($name)) as $parentClass) { |
360 | - if (! $this->getDriver()->isTransient($parentClass)) { |
|
360 | + if ( ! $this->getDriver()->isTransient($parentClass)) { |
|
361 | 361 | $parentClasses[] = $parentClass; |
362 | 362 | } |
363 | 363 | } |
@@ -372,7 +372,7 @@ discard block |
||
372 | 372 | string $className, |
373 | 373 | ClassMetadataBuildingContext $metadataBuildingContext |
374 | 374 | ) : ?ClassMetadata { |
375 | - if (! $this->evm->hasListeners(Events::onClassMetadataNotFound)) { |
|
375 | + if ( ! $this->evm->hasListeners(Events::onClassMetadataNotFound)) { |
|
376 | 376 | return null; |
377 | 377 | } |
378 | 378 | |
@@ -416,7 +416,7 @@ discard block |
||
416 | 416 | */ |
417 | 417 | protected function validateRuntimeMetadata(ClassMetadata $class, ?ClassMetadata $parent = null) : void |
418 | 418 | { |
419 | - if (! $class->getReflectionClass()) { |
|
419 | + if ( ! $class->getReflectionClass()) { |
|
420 | 420 | // only validate if there is a reflection class instance |
421 | 421 | return; |
422 | 422 | } |
@@ -426,13 +426,13 @@ discard block |
||
426 | 426 | $class->validateLifecycleCallbacks($this->getReflectionService()); |
427 | 427 | |
428 | 428 | // verify inheritance |
429 | - if (! $class->isMappedSuperclass && $class->inheritanceType !== InheritanceType::NONE) { |
|
430 | - if (! $parent) { |
|
431 | - if (! $class->discriminatorMap) { |
|
429 | + if ( ! $class->isMappedSuperclass && $class->inheritanceType !== InheritanceType::NONE) { |
|
430 | + if ( ! $parent) { |
|
431 | + if ( ! $class->discriminatorMap) { |
|
432 | 432 | throw MappingException::missingDiscriminatorMap($class->getClassName()); |
433 | 433 | } |
434 | 434 | |
435 | - if (! $class->discriminatorColumn) { |
|
435 | + if ( ! $class->discriminatorColumn) { |
|
436 | 436 | throw MappingException::missingDiscriminatorColumn($class->getClassName()); |
437 | 437 | } |
438 | 438 | } |
@@ -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 | /** |
@@ -384,7 +384,7 @@ discard block |
||
384 | 384 | */ |
385 | 385 | public static function duplicateQueryMapping($entity, $queryName) |
386 | 386 | { |
387 | - return new self('Query named "' . $queryName . '" in "' . $entity . '" was already declared, but it must be declared only once'); |
|
387 | + return new self('Query named "'.$queryName.'" in "'.$entity.'" was already declared, but it must be declared only once'); |
|
388 | 388 | } |
389 | 389 | |
390 | 390 | /** |
@@ -395,7 +395,7 @@ discard block |
||
395 | 395 | */ |
396 | 396 | public static function duplicateResultSetMapping($entity, $resultName) |
397 | 397 | { |
398 | - return new self('Result set mapping named "' . $resultName . '" in "' . $entity . '" was already declared, but it must be declared only once'); |
|
398 | + return new self('Result set mapping named "'.$resultName.'" in "'.$entity.'" was already declared, but it must be declared only once'); |
|
399 | 399 | } |
400 | 400 | |
401 | 401 | /** |
@@ -405,7 +405,7 @@ discard block |
||
405 | 405 | */ |
406 | 406 | public static function singleIdNotAllowedOnCompositePrimaryKey($entity) |
407 | 407 | { |
408 | - return new self('Single id is not allowed on composite primary key in entity ' . $entity); |
|
408 | + return new self('Single id is not allowed on composite primary key in entity '.$entity); |
|
409 | 409 | } |
410 | 410 | |
411 | 411 | /** |
@@ -415,7 +415,7 @@ discard block |
||
415 | 415 | */ |
416 | 416 | public static function noIdDefined($entity) |
417 | 417 | { |
418 | - return new self('No ID defined for entity ' . $entity); |
|
418 | + return new self('No ID defined for entity '.$entity); |
|
419 | 419 | } |
420 | 420 | |
421 | 421 | /** |
@@ -423,7 +423,7 @@ discard block |
||
423 | 423 | */ |
424 | 424 | public static function unsupportedOptimisticLockingType(Type $unsupportedType) |
425 | 425 | { |
426 | - return new self('Locking type "' . $unsupportedType->getName() . '" is not supported by Doctrine.'); |
|
426 | + return new self('Locking type "'.$unsupportedType->getName().'" is not supported by Doctrine.'); |
|
427 | 427 | } |
428 | 428 | |
429 | 429 | /** |
@@ -433,13 +433,13 @@ discard block |
||
433 | 433 | */ |
434 | 434 | public static function fileMappingDriversRequireConfiguredDirectoryPath($path = null) |
435 | 435 | { |
436 | - if (! empty($path)) { |
|
437 | - $path = '[' . $path . ']'; |
|
436 | + if ( ! empty($path)) { |
|
437 | + $path = '['.$path.']'; |
|
438 | 438 | } |
439 | 439 | |
440 | 440 | return new self( |
441 | - 'File mapping drivers must have a valid directory path, ' . |
|
442 | - 'however the given path ' . $path . ' seems to be incorrect!' |
|
441 | + 'File mapping drivers must have a valid directory path, '. |
|
442 | + 'however the given path '.$path.' seems to be incorrect!' |
|
443 | 443 | ); |
444 | 444 | } |
445 | 445 | |
@@ -455,7 +455,7 @@ discard block |
||
455 | 455 | public static function invalidClassInDiscriminatorMap($className, $owningClass) |
456 | 456 | { |
457 | 457 | return new self(sprintf( |
458 | - "Entity class '%s' used in the discriminator map of class '%s' " . |
|
458 | + "Entity class '%s' used in the discriminator map of class '%s' ". |
|
459 | 459 | 'does not exist.', |
460 | 460 | $className, |
461 | 461 | $owningClass |
@@ -521,7 +521,7 @@ discard block |
||
521 | 521 | public static function sqlConversionNotAllowedForPrimaryKeyProperties($className, $fieldName, $type) |
522 | 522 | { |
523 | 523 | return new self(sprintf( |
524 | - 'It is not possible to set id field "%s" to type "%s" in entity class "%s". ' . |
|
524 | + 'It is not possible to set id field "%s" to type "%s" in entity class "%s". '. |
|
525 | 525 | 'The type "%s" requires conversion SQL which is not allowed for identifiers.', |
526 | 526 | $fieldName, |
527 | 527 | $type, |
@@ -557,7 +557,7 @@ discard block |
||
557 | 557 | */ |
558 | 558 | public static function duplicateColumnName($className, $columnName) |
559 | 559 | { |
560 | - return new self("Duplicate definition of column '" . $columnName . "' on entity '" . $className . "' in a field or discriminator column mapping."); |
|
560 | + return new self("Duplicate definition of column '".$columnName."' on entity '".$className."' in a field or discriminator column mapping."); |
|
561 | 561 | } |
562 | 562 | |
563 | 563 | /** |
@@ -568,7 +568,7 @@ discard block |
||
568 | 568 | */ |
569 | 569 | public static function illegalToManyAssociationOnMappedSuperclass($className, $field) |
570 | 570 | { |
571 | - return new self("It is illegal to put an inverse side one-to-many or many-to-many association on mapped superclass '" . $className . '#' . $field . "'."); |
|
571 | + return new self("It is illegal to put an inverse side one-to-many or many-to-many association on mapped superclass '".$className.'#'.$field."'."); |
|
572 | 572 | } |
573 | 573 | |
574 | 574 | /** |
@@ -580,8 +580,8 @@ discard block |
||
580 | 580 | */ |
581 | 581 | public static function cannotMapCompositePrimaryKeyEntitiesAsForeignId($className, $targetEntity, $targetField) |
582 | 582 | { |
583 | - return new self("It is not possible to map entity '" . $className . "' with a composite primary key " . |
|
584 | - "as part of the primary key of another entity '" . $targetEntity . '#' . $targetField . "'."); |
|
583 | + return new self("It is not possible to map entity '".$className."' with a composite primary key ". |
|
584 | + "as part of the primary key of another entity '".$targetEntity.'#'.$targetField."'."); |
|
585 | 585 | } |
586 | 586 | |
587 | 587 | /** |
@@ -635,8 +635,8 @@ discard block |
||
635 | 635 | */ |
636 | 636 | public static function illegalOrphanRemoval($className, $field) |
637 | 637 | { |
638 | - return new self('Orphan removal is only allowed on one-to-one and one-to-many ' . |
|
639 | - 'associations, but ' . $className . '#' . $field . ' is not.'); |
|
638 | + return new self('Orphan removal is only allowed on one-to-one and one-to-many '. |
|
639 | + 'associations, but '.$className.'#'.$field.' is not.'); |
|
640 | 640 | } |
641 | 641 | |
642 | 642 | /** |
@@ -668,7 +668,7 @@ discard block |
||
668 | 668 | */ |
669 | 669 | public static function noInheritanceOnMappedSuperClass($className) |
670 | 670 | { |
671 | - return new self("It is not supported to define inheritance information on a mapped superclass '" . $className . "'."); |
|
671 | + return new self("It is not supported to define inheritance information on a mapped superclass '".$className."'."); |
|
672 | 672 | } |
673 | 673 | |
674 | 674 | /** |
@@ -680,8 +680,8 @@ discard block |
||
680 | 680 | public static function mappedClassNotPartOfDiscriminatorMap($className, $rootClassName) |
681 | 681 | { |
682 | 682 | return new self( |
683 | - "Entity '" . $className . "' has to be part of the discriminator map of '" . $rootClassName . "' " . |
|
684 | - "to be properly mapped in the inheritance hierarchy. Alternatively you can make '" . $className . "' an abstract class " . |
|
683 | + "Entity '".$className."' has to be part of the discriminator map of '".$rootClassName."' ". |
|
684 | + "to be properly mapped in the inheritance hierarchy. Alternatively you can make '".$className."' an abstract class ". |
|
685 | 685 | 'to avoid this exception from occurring.' |
686 | 686 | ); |
687 | 687 | } |
@@ -694,7 +694,7 @@ discard block |
||
694 | 694 | */ |
695 | 695 | public static function lifecycleCallbackMethodNotFound($className, $methodName) |
696 | 696 | { |
697 | - return new self("Entity '" . $className . "' has no public method '" . $methodName . "' to be registered as lifecycle callback."); |
|
697 | + return new self("Entity '".$className."' has no public method '".$methodName."' to be registered as lifecycle callback."); |
|
698 | 698 | } |
699 | 699 | |
700 | 700 | /** |
@@ -728,7 +728,7 @@ discard block |
||
728 | 728 | */ |
729 | 729 | public static function invalidFetchMode($className, $annotation) |
730 | 730 | { |
731 | - return new self("Entity '" . $className . "' has a mapping with invalid fetch mode '" . $annotation . "'"); |
|
731 | + return new self("Entity '".$className."' has a mapping with invalid fetch mode '".$annotation."'"); |
|
732 | 732 | } |
733 | 733 | |
734 | 734 | /** |
@@ -738,7 +738,7 @@ discard block |
||
738 | 738 | */ |
739 | 739 | public static function compositeKeyAssignedIdGeneratorRequired($className) |
740 | 740 | { |
741 | - return new self("Entity '" . $className . "' has a composite identifier but uses an ID generator other than manually assigning (Identity, Sequence). This is not supported."); |
|
741 | + return new self("Entity '".$className."' has a composite identifier but uses an ID generator other than manually assigning (Identity, Sequence). This is not supported."); |
|
742 | 742 | } |
743 | 743 | |
744 | 744 | /** |
@@ -750,7 +750,7 @@ discard block |
||
750 | 750 | */ |
751 | 751 | public static function invalidTargetEntityClass($targetEntity, $sourceEntity, $associationName) |
752 | 752 | { |
753 | - return new self("The target-entity '" . $targetEntity . "' cannot be found in '" . $sourceEntity . '#' . $associationName . "'."); |
|
753 | + return new self("The target-entity '".$targetEntity."' cannot be found in '".$sourceEntity.'#'.$associationName."'."); |
|
754 | 754 | } |
755 | 755 | |
756 | 756 | /** |
@@ -762,8 +762,8 @@ discard block |
||
762 | 762 | */ |
763 | 763 | public static function invalidCascadeOption(array $cascades, $className, $propertyName) |
764 | 764 | { |
765 | - $cascades = implode(', ', array_map(static function ($e) { |
|
766 | - return "'" . $e . "'"; |
|
765 | + $cascades = implode(', ', array_map(static function($e) { |
|
766 | + return "'".$e."'"; |
|
767 | 767 | }, $cascades)); |
768 | 768 | |
769 | 769 | return new self(sprintf( |
@@ -796,7 +796,7 @@ discard block |
||
796 | 796 | { |
797 | 797 | return new self( |
798 | 798 | sprintf( |
799 | - 'Infinite nesting detected for embedded property %s::%s. ' . |
|
799 | + 'Infinite nesting detected for embedded property %s::%s. '. |
|
800 | 800 | 'You cannot embed an embeddable from the same type inside an embeddable.', |
801 | 801 | $className, |
802 | 802 | $propertyName |
@@ -811,7 +811,7 @@ discard block |
||
811 | 811 | { |
812 | 812 | return new self( |
813 | 813 | sprintf( |
814 | - 'Class %s not found in namespaces %s.' . |
|
814 | + 'Class %s not found in namespaces %s.'. |
|
815 | 815 | $className, |
816 | 816 | implode(', ', $namespaces) |
817 | 817 | ) |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | return $this->classNames; |
214 | 214 | } |
215 | 215 | |
216 | - if (! $this->paths) { |
|
216 | + if ( ! $this->paths) { |
|
217 | 217 | throw Mapping\MappingException::pathRequired(); |
218 | 218 | } |
219 | 219 | |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | $includedFiles = []; |
222 | 222 | |
223 | 223 | foreach ($this->paths as $path) { |
224 | - if (! is_dir($path)) { |
|
224 | + if ( ! is_dir($path)) { |
|
225 | 225 | throw Mapping\MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path); |
226 | 226 | } |
227 | 227 | |
@@ -230,14 +230,14 @@ discard block |
||
230 | 230 | new RecursiveDirectoryIterator($path, FilesystemIterator::SKIP_DOTS), |
231 | 231 | RecursiveIteratorIterator::LEAVES_ONLY |
232 | 232 | ), |
233 | - '/^.+' . preg_quote($this->fileExtension) . '$/i', |
|
233 | + '/^.+'.preg_quote($this->fileExtension).'$/i', |
|
234 | 234 | RecursiveRegexIterator::GET_MATCH |
235 | 235 | ); |
236 | 236 | |
237 | 237 | foreach ($iterator as $file) { |
238 | 238 | $sourceFile = $file[0]; |
239 | 239 | |
240 | - if (! preg_match('(^phar:)i', $sourceFile)) { |
|
240 | + if ( ! preg_match('(^phar:)i', $sourceFile)) { |
|
241 | 241 | $sourceFile = realpath($sourceFile); |
242 | 242 | } |
243 | 243 | |
@@ -415,7 +415,7 @@ discard block |
||
415 | 415 | if ($parent && $parent->inheritanceType === Mapping\InheritanceType::SINGLE_TABLE) { |
416 | 416 | // Handle the case where a middle mapped super class inherits from a single table inheritance tree. |
417 | 417 | do { |
418 | - if (! $parent->isMappedSuperclass) { |
|
418 | + if ( ! $parent->isMappedSuperclass) { |
|
419 | 419 | $metadata->setTable($parent->table); |
420 | 420 | |
421 | 421 | break; |
@@ -684,12 +684,12 @@ discard block |
||
684 | 684 | $assocMetadata->setOrphanRemoval($oneToOneAnnot->orphanRemoval); |
685 | 685 | $assocMetadata->setFetchMode($this->getFetchMode($className, $oneToOneAnnot->fetch)); |
686 | 686 | |
687 | - if (! empty($oneToOneAnnot->mappedBy)) { |
|
687 | + if ( ! empty($oneToOneAnnot->mappedBy)) { |
|
688 | 688 | $assocMetadata->setMappedBy($oneToOneAnnot->mappedBy); |
689 | 689 | $assocMetadata->setOwningSide(false); |
690 | 690 | } |
691 | 691 | |
692 | - if (! empty($oneToOneAnnot->inversedBy)) { |
|
692 | + if ( ! empty($oneToOneAnnot->inversedBy)) { |
|
693 | 693 | $assocMetadata->setInversedBy($oneToOneAnnot->inversedBy); |
694 | 694 | $assocMetadata->setOwningSide(true); |
695 | 695 | } |
@@ -712,7 +712,7 @@ discard block |
||
712 | 712 | } |
713 | 713 | |
714 | 714 | // Check for owning side to consider join column |
715 | - if (! $assocMetadata->isOwningSide()) { |
|
715 | + if ( ! $assocMetadata->isOwningSide()) { |
|
716 | 716 | return $assocMetadata; |
717 | 717 | } |
718 | 718 | |
@@ -769,7 +769,7 @@ discard block |
||
769 | 769 | $assocMetadata->setCascade($this->getCascade($className, $fieldName, $manyToOneAnnot->cascade)); |
770 | 770 | $assocMetadata->setFetchMode($this->getFetchMode($className, $manyToOneAnnot->fetch)); |
771 | 771 | |
772 | - if (! empty($manyToOneAnnot->inversedBy)) { |
|
772 | + if ( ! empty($manyToOneAnnot->inversedBy)) { |
|
773 | 773 | $assocMetadata->setInversedBy($manyToOneAnnot->inversedBy); |
774 | 774 | } |
775 | 775 | |
@@ -847,7 +847,7 @@ discard block |
||
847 | 847 | $assocMetadata->setOwningSide(false); |
848 | 848 | $assocMetadata->setMappedBy($oneToManyAnnot->mappedBy); |
849 | 849 | |
850 | - if (! empty($oneToManyAnnot->indexBy)) { |
|
850 | + if ( ! empty($oneToManyAnnot->indexBy)) { |
|
851 | 851 | $assocMetadata->setIndexedBy($oneToManyAnnot->indexBy); |
852 | 852 | } |
853 | 853 | |
@@ -900,16 +900,16 @@ discard block |
||
900 | 900 | $assocMetadata->setOrphanRemoval($manyToManyAnnot->orphanRemoval); |
901 | 901 | $assocMetadata->setFetchMode($this->getFetchMode($className, $manyToManyAnnot->fetch)); |
902 | 902 | |
903 | - if (! empty($manyToManyAnnot->mappedBy)) { |
|
903 | + if ( ! empty($manyToManyAnnot->mappedBy)) { |
|
904 | 904 | $assocMetadata->setMappedBy($manyToManyAnnot->mappedBy); |
905 | 905 | $assocMetadata->setOwningSide(false); |
906 | 906 | } |
907 | 907 | |
908 | - if (! empty($manyToManyAnnot->inversedBy)) { |
|
908 | + if ( ! empty($manyToManyAnnot->inversedBy)) { |
|
909 | 909 | $assocMetadata->setInversedBy($manyToManyAnnot->inversedBy); |
910 | 910 | } |
911 | 911 | |
912 | - if (! empty($manyToManyAnnot->indexBy)) { |
|
912 | + if ( ! empty($manyToManyAnnot->indexBy)) { |
|
913 | 913 | $assocMetadata->setIndexedBy($manyToManyAnnot->indexBy); |
914 | 914 | } |
915 | 915 | |
@@ -938,7 +938,7 @@ discard block |
||
938 | 938 | } |
939 | 939 | |
940 | 940 | // Check for owning side to consider join column |
941 | - if (! $assocMetadata->isOwningSide()) { |
|
941 | + if ( ! $assocMetadata->isOwningSide()) { |
|
942 | 942 | return $assocMetadata; |
943 | 943 | } |
944 | 944 | |
@@ -1019,7 +1019,7 @@ discard block |
||
1019 | 1019 | ]; |
1020 | 1020 | |
1021 | 1021 | foreach ($entityListenersAnnot->value as $listenerClassName) { |
1022 | - if (! class_exists($listenerClassName)) { |
|
1022 | + if ( ! class_exists($listenerClassName)) { |
|
1023 | 1023 | throw Mapping\MappingException::entityListenerClassNotFound( |
1024 | 1024 | $listenerClassName, |
1025 | 1025 | $metadata->getClassName() |
@@ -1061,7 +1061,7 @@ discard block |
||
1061 | 1061 | $fieldName = $associationOverride->name; |
1062 | 1062 | $property = $metadata->getProperty($fieldName); |
1063 | 1063 | |
1064 | - if (! $property) { |
|
1064 | + if ( ! $property) { |
|
1065 | 1065 | throw Mapping\MappingException::invalidOverrideFieldName($metadata->getClassName(), $fieldName); |
1066 | 1066 | } |
1067 | 1067 | |
@@ -1108,7 +1108,7 @@ discard block |
||
1108 | 1108 | // Check for fetch |
1109 | 1109 | if ($associationOverride->fetch) { |
1110 | 1110 | $override->setFetchMode( |
1111 | - constant(Mapping\FetchMode::class . '::' . $associationOverride->fetch) |
|
1111 | + constant(Mapping\FetchMode::class.'::'.$associationOverride->fetch) |
|
1112 | 1112 | ); |
1113 | 1113 | } |
1114 | 1114 | |
@@ -1179,7 +1179,7 @@ discard block |
||
1179 | 1179 | { |
1180 | 1180 | $fetchModeConstant = sprintf('%s::%s', Mapping\FetchMode::class, $fetchMode); |
1181 | 1181 | |
1182 | - if (! defined($fetchModeConstant)) { |
|
1182 | + if ( ! defined($fetchModeConstant)) { |
|
1183 | 1183 | throw Mapping\MappingException::invalidFetchMode($className, $fetchMode); |
1184 | 1184 | } |
1185 | 1185 | |
@@ -1194,7 +1194,7 @@ discard block |
||
1194 | 1194 | $classAnnotations = $this->reader->getClassAnnotations($reflectionClass); |
1195 | 1195 | |
1196 | 1196 | foreach ($classAnnotations as $key => $annot) { |
1197 | - if (! is_numeric($key)) { |
|
1197 | + if ( ! is_numeric($key)) { |
|
1198 | 1198 | continue; |
1199 | 1199 | } |
1200 | 1200 | |
@@ -1212,7 +1212,7 @@ discard block |
||
1212 | 1212 | $propertyAnnotations = $this->reader->getPropertyAnnotations($reflectionProperty); |
1213 | 1213 | |
1214 | 1214 | foreach ($propertyAnnotations as $key => $annot) { |
1215 | - if (! is_numeric($key)) { |
|
1215 | + if ( ! is_numeric($key)) { |
|
1216 | 1216 | continue; |
1217 | 1217 | } |
1218 | 1218 | |
@@ -1230,7 +1230,7 @@ discard block |
||
1230 | 1230 | $methodAnnotations = $this->reader->getMethodAnnotations($reflectionMethod); |
1231 | 1231 | |
1232 | 1232 | foreach ($methodAnnotations as $key => $annot) { |
1233 | - if (! is_numeric($key)) { |
|
1233 | + if ( ! is_numeric($key)) { |
|
1234 | 1234 | continue; |
1235 | 1235 | } |
1236 | 1236 |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | if ($parent && $parent->inheritanceType === Mapping\InheritanceType::SINGLE_TABLE) { |
81 | 81 | // Handle the case where a middle mapped super class inherits from a single table inheritance tree. |
82 | 82 | do { |
83 | - if (! $parent->isMappedSuperclass) { |
|
83 | + if ( ! $parent->isMappedSuperclass) { |
|
84 | 84 | $metadata->setTable($parent->table); |
85 | 85 | |
86 | 86 | break; |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | } |
332 | 332 | |
333 | 333 | // Check for owning side to consider join column |
334 | - if (! $association->isOwningSide()) { |
|
334 | + if ( ! $association->isOwningSide()) { |
|
335 | 335 | $metadata->addProperty($association); |
336 | 336 | |
337 | 337 | continue; |
@@ -449,7 +449,7 @@ discard block |
||
449 | 449 | |
450 | 450 | if (isset($manyToOneElement['fetch'])) { |
451 | 451 | $association->setFetchMode( |
452 | - constant('Doctrine\ORM\Mapping\FetchMode::' . (string) $manyToOneElement['fetch']) |
|
452 | + constant('Doctrine\ORM\Mapping\FetchMode::'.(string) $manyToOneElement['fetch']) |
|
453 | 453 | ); |
454 | 454 | } |
455 | 455 | |
@@ -575,7 +575,7 @@ discard block |
||
575 | 575 | } |
576 | 576 | |
577 | 577 | // Check for owning side to consider join column |
578 | - if (! $association->isOwningSide()) { |
|
578 | + if ( ! $association->isOwningSide()) { |
|
579 | 579 | $metadata->addProperty($association); |
580 | 580 | |
581 | 581 | continue; |
@@ -643,7 +643,7 @@ discard block |
||
643 | 643 | $fieldName = (string) $overrideElement['name']; |
644 | 644 | $property = $metadata->getProperty($fieldName); |
645 | 645 | |
646 | - if (! $property) { |
|
646 | + if ( ! $property) { |
|
647 | 647 | throw Mapping\MappingException::invalidOverrideFieldName($metadata->getClassName(), $fieldName); |
648 | 648 | } |
649 | 649 | |
@@ -692,7 +692,7 @@ discard block |
||
692 | 692 | // Check for fetch |
693 | 693 | if (isset($overrideElement['fetch'])) { |
694 | 694 | $override->setFetchMode( |
695 | - constant('Doctrine\ORM\Mapping\FetchMode::' . (string) $overrideElement['fetch']) |
|
695 | + constant('Doctrine\ORM\Mapping\FetchMode::'.(string) $overrideElement['fetch']) |
|
696 | 696 | ); |
697 | 697 | } |
698 | 698 | |
@@ -703,7 +703,7 @@ discard block |
||
703 | 703 | // Evaluate <lifecycle-callbacks...> |
704 | 704 | if (isset($xmlRoot->{'lifecycle-callbacks'})) { |
705 | 705 | foreach ($xmlRoot->{'lifecycle-callbacks'}->{'lifecycle-callback'} as $lifecycleCallback) { |
706 | - $eventName = constant(Events::class . '::' . (string) $lifecycleCallback['type']); |
|
706 | + $eventName = constant(Events::class.'::'.(string) $lifecycleCallback['type']); |
|
707 | 707 | $methodName = (string) $lifecycleCallback['method']; |
708 | 708 | |
709 | 709 | $metadata->addLifecycleCallback($eventName, $methodName); |
@@ -715,7 +715,7 @@ discard block |
||
715 | 715 | foreach ($xmlRoot->{'entity-listeners'}->{'entity-listener'} as $listenerElement) { |
716 | 716 | $listenerClassName = (string) $listenerElement['class']; |
717 | 717 | |
718 | - if (! class_exists($listenerClassName)) { |
|
718 | + if ( ! class_exists($listenerClassName)) { |
|
719 | 719 | throw Mapping\MappingException::entityListenerClassNotFound( |
720 | 720 | $listenerClassName, |
721 | 721 | $metadata->getClassName() |
@@ -180,11 +180,11 @@ discard block |
||
180 | 180 | $pkColumns = []; |
181 | 181 | |
182 | 182 | foreach ($class->getPropertiesIterator() as $fieldName => $property) { |
183 | - if (! ($property instanceof FieldMetadata)) { |
|
183 | + if ( ! ($property instanceof FieldMetadata)) { |
|
184 | 184 | continue; |
185 | 185 | } |
186 | 186 | |
187 | - if (! $class->isInheritedProperty($fieldName)) { |
|
187 | + if ( ! $class->isInheritedProperty($fieldName)) { |
|
188 | 188 | $columnName = $this->platform->quoteIdentifier($property->getColumnName()); |
189 | 189 | |
190 | 190 | $this->gatherColumn($class, $property, $table); |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | } |
220 | 220 | } |
221 | 221 | |
222 | - if (! empty($inheritedKeyColumns)) { |
|
222 | + if ( ! empty($inheritedKeyColumns)) { |
|
223 | 223 | // Add a FK constraint on the ID column |
224 | 224 | $rootClass = $this->em->getClassMetadata($class->getRootClassName()); |
225 | 225 | |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | } |
265 | 265 | } |
266 | 266 | |
267 | - if (! $table->hasIndex('primary')) { |
|
267 | + if ( ! $table->hasIndex('primary')) { |
|
268 | 268 | $table->setPrimaryKey($pkColumns); |
269 | 269 | } |
270 | 270 | |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | $processedClasses[$class->getClassName()] = true; |
325 | 325 | |
326 | 326 | foreach ($class->getPropertiesIterator() as $property) { |
327 | - if (! $property instanceof FieldMetadata |
|
327 | + if ( ! $property instanceof FieldMetadata |
|
328 | 328 | || ! $property->hasValueGenerator() |
329 | 329 | || $property->getValueGenerator()->getType() !== GeneratorType::SEQUENCE |
330 | 330 | || $class->getClassName() !== $class->getRootClassName()) { |
@@ -334,7 +334,7 @@ discard block |
||
334 | 334 | $generator = $property->getValueGenerator()->getGenerator(); |
335 | 335 | $quotedName = $generator->getSequenceName(); |
336 | 336 | |
337 | - if (! $schema->hasSequence($quotedName)) { |
|
337 | + if ( ! $schema->hasSequence($quotedName)) { |
|
338 | 338 | $schema->createSequence($quotedName, $generator->getAllocationSize()); |
339 | 339 | } |
340 | 340 | } |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | } |
348 | 348 | } |
349 | 349 | |
350 | - if (! $this->platform->supportsSchemas() && ! $this->platform->canEmulateSchemas()) { |
|
350 | + if ( ! $this->platform->supportsSchemas() && ! $this->platform->canEmulateSchemas()) { |
|
351 | 351 | $schema->visit(new RemoveNamespacedAssets()); |
352 | 352 | } |
353 | 353 | |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | break; |
387 | 387 | } |
388 | 388 | |
389 | - if (! empty($discrColumn->getColumnDefinition())) { |
|
389 | + if ( ! empty($discrColumn->getColumnDefinition())) { |
|
390 | 390 | $options['columnDefinition'] = $discrColumn->getColumnDefinition(); |
391 | 391 | } |
392 | 392 | |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | $pkColumns = []; |
405 | 405 | |
406 | 406 | foreach ($class->getPropertiesIterator() as $fieldName => $property) { |
407 | - if (! ($property instanceof FieldMetadata)) { |
|
407 | + if ( ! ($property instanceof FieldMetadata)) { |
|
408 | 408 | continue; |
409 | 409 | } |
410 | 410 | |
@@ -508,7 +508,7 @@ discard block |
||
508 | 508 | private function gatherRelationsSql($class, $table, $schema, &$addedFks, &$blacklistedFks) |
509 | 509 | { |
510 | 510 | foreach ($class->getPropertiesIterator() as $fieldName => $property) { |
511 | - if (! ($property instanceof AssociationMetadata)) { |
|
511 | + if ( ! ($property instanceof AssociationMetadata)) { |
|
512 | 512 | continue; |
513 | 513 | } |
514 | 514 | |
@@ -516,7 +516,7 @@ discard block |
||
516 | 516 | continue; |
517 | 517 | } |
518 | 518 | |
519 | - if (! $property->isOwningSide()) { |
|
519 | + if ( ! $property->isOwningSide()) { |
|
520 | 520 | continue; |
521 | 521 | } |
522 | 522 | |
@@ -606,7 +606,7 @@ discard block |
||
606 | 606 | $idColumns = $class->getIdentifierColumns($this->em); |
607 | 607 | $idColumnNameList = array_keys($idColumns); |
608 | 608 | |
609 | - if (! in_array($referencedColumnName, $idColumnNameList, true)) { |
|
609 | + if ( ! in_array($referencedColumnName, $idColumnNameList, true)) { |
|
610 | 610 | return null; |
611 | 611 | } |
612 | 612 | |
@@ -614,7 +614,7 @@ discard block |
||
614 | 614 | foreach ($class->getIdentifierFieldNames() as $fieldName) { |
615 | 615 | $property = $class->getProperty($fieldName); |
616 | 616 | |
617 | - if (! ($property instanceof AssociationMetadata)) { |
|
617 | + if ( ! ($property instanceof AssociationMetadata)) { |
|
618 | 618 | continue; |
619 | 619 | } |
620 | 620 | |
@@ -670,7 +670,7 @@ discard block |
||
670 | 670 | $joinColumn->getReferencedColumnName() |
671 | 671 | ); |
672 | 672 | |
673 | - if (! $definingClass) { |
|
673 | + if ( ! $definingClass) { |
|
674 | 674 | throw MissingColumnException::fromColumnSourceAndTarget( |
675 | 675 | $joinColumn->getReferencedColumnName(), |
676 | 676 | $mapping->getSourceEntity(), |
@@ -685,14 +685,14 @@ discard block |
||
685 | 685 | $localColumns[] = $quotedColumnName; |
686 | 686 | $foreignColumns[] = $quotedReferencedColumnName; |
687 | 687 | |
688 | - if (! $theJoinTable->hasColumn($quotedColumnName)) { |
|
688 | + if ( ! $theJoinTable->hasColumn($quotedColumnName)) { |
|
689 | 689 | // Only add the column to the table if it does not exist already. |
690 | 690 | // It might exist already if the foreign key is mapped into a regular |
691 | 691 | // property as well. |
692 | 692 | $property = $definingClass->getProperty($referencedFieldName); |
693 | 693 | $columnDef = null; |
694 | 694 | |
695 | - if (! empty($joinColumn->getColumnDefinition())) { |
|
695 | + if ( ! empty($joinColumn->getColumnDefinition())) { |
|
696 | 696 | $columnDef = $joinColumn->getColumnDefinition(); |
697 | 697 | } elseif ($property->getColumnDefinition()) { |
698 | 698 | $columnDef = $property->getColumnDefinition(); |
@@ -724,7 +724,7 @@ discard block |
||
724 | 724 | $uniqueConstraints[] = ['columns' => [$quotedColumnName]]; |
725 | 725 | } |
726 | 726 | |
727 | - if (! empty($joinColumn->getOnDelete())) { |
|
727 | + if ( ! empty($joinColumn->getOnDelete())) { |
|
728 | 728 | $fkOptions['onDelete'] = $joinColumn->getOnDelete(); |
729 | 729 | } |
730 | 730 | } |
@@ -735,7 +735,7 @@ discard block |
||
735 | 735 | $theJoinTable->addUniqueIndex($unique['columns'], is_numeric($indexName) ? null : $indexName); |
736 | 736 | } |
737 | 737 | |
738 | - $compositeName = $theJoinTable->getName() . '.' . implode('', $localColumns); |
|
738 | + $compositeName = $theJoinTable->getName().'.'.implode('', $localColumns); |
|
739 | 739 | |
740 | 740 | if (isset($addedFks[$compositeName]) |
741 | 741 | && ($foreignTableName !== $addedFks[$compositeName]['foreignTableName'] |
@@ -752,7 +752,7 @@ discard block |
||
752 | 752 | } |
753 | 753 | |
754 | 754 | $blacklistedFks[$compositeName] = true; |
755 | - } elseif (! isset($blacklistedFks[$compositeName])) { |
|
755 | + } elseif ( ! isset($blacklistedFks[$compositeName])) { |
|
756 | 756 | $addedFks[$compositeName] = [ |
757 | 757 | 'foreignTableName' => $foreignTableName, |
758 | 758 | 'foreignColumns' => $foreignColumns, |
@@ -851,7 +851,7 @@ discard block |
||
851 | 851 | $fullSchema = $sm->createSchema(); |
852 | 852 | |
853 | 853 | foreach ($fullSchema->getTables() as $table) { |
854 | - if (! $schema->hasTable($table->getName())) { |
|
854 | + if ( ! $schema->hasTable($table->getName())) { |
|
855 | 855 | foreach ($table->getForeignKeys() as $foreignKey) { |
856 | 856 | /** @var $foreignKey ForeignKeyConstraint */ |
857 | 857 | if ($schema->hasTable($foreignKey->getForeignTableName())) { |
@@ -876,7 +876,7 @@ discard block |
||
876 | 876 | if ($table->hasPrimaryKey()) { |
877 | 877 | $columns = $table->getPrimaryKey()->getColumns(); |
878 | 878 | if (count($columns) === 1) { |
879 | - $checkSequence = $table->getName() . '_' . $columns[0] . '_seq'; |
|
879 | + $checkSequence = $table->getName().'_'.$columns[0].'_seq'; |
|
880 | 880 | if ($fullSchema->hasSequence($checkSequence)) { |
881 | 881 | $visitor->acceptSequence($fullSchema->getSequence($checkSequence)); |
882 | 882 | } |