Completed
Push — master ( f4c848...d31188 )
by Jonathan
24s queued 17s
created
lib/Doctrine/ORM/Mapping/Factory/RuntimeClassMetadataFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 
18 18
     protected function getReflectionService() : RuntimeReflectionService
19 19
     {
20
-        if (! $this->reflectionService) {
20
+        if ( ! $this->reflectionService) {
21 21
             $this->reflectionService = new RuntimeReflectionService();
22 22
         }
23 23
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Factory/UnderscoreNamingStrategy.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      */
77 77
     public function embeddedFieldToColumnName($propertyName, $embeddedColumnName, $className = null, $embeddedClassName = null)
78 78
     {
79
-        return $this->underscore($propertyName) . '_' . $embeddedColumnName;
79
+        return $this->underscore($propertyName).'_'.$embeddedColumnName;
80 80
     }
81 81
 
82 82
     /**
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
      */
93 93
     public function joinColumnName($propertyName, $className = null)
94 94
     {
95
-        return $this->underscore($propertyName) . '_' . $this->referenceColumnName();
95
+        return $this->underscore($propertyName).'_'.$this->referenceColumnName();
96 96
     }
97 97
 
98 98
     /**
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
      */
101 101
     public function joinTableName($sourceEntity, $targetEntity, $propertyName = null)
102 102
     {
103
-        return $this->classToTableName($sourceEntity) . '_' . $this->classToTableName($targetEntity);
103
+        return $this->classToTableName($sourceEntity).'_'.$this->classToTableName($targetEntity);
104 104
     }
105 105
 
106 106
     /**
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
      */
109 109
     public function joinKeyColumnName($entityName, $referencedColumnName = null)
110 110
     {
111
-        return $this->classToTableName($entityName) . '_' .
111
+        return $this->classToTableName($entityName).'_'.
112 112
                 ($referencedColumnName ?: $this->referenceColumnName());
113 113
     }
114 114
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Factory/StaticClassMetadataFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 
18 18
     protected function getReflectionService() : StaticReflectionService
19 19
     {
20
-        if (! $this->reflectionService) {
20
+        if ( ! $this->reflectionService) {
21 21
             $this->reflectionService = new StaticReflectionService();
22 22
         }
23 23
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Factory/Autoloader.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         // remove namespace separators from remaining class name
46 46
         $fileName = str_replace('\\', '', $classNameRelativeToMetadataNamespace);
47 47
 
48
-        return $metadataDir . DIRECTORY_SEPARATOR . $fileName . '.php';
48
+        return $metadataDir.DIRECTORY_SEPARATOR.$fileName.'.php';
49 49
     }
50 50
 
51 51
     /**
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     ) : \Closure {
63 63
         $metadataNamespace = ltrim($metadataNamespace, '\\');
64 64
 
65
-        if (! ($notFoundCallback === null || is_callable($notFoundCallback))) {
65
+        if ( ! ($notFoundCallback === null || is_callable($notFoundCallback))) {
66 66
             $type = is_object($notFoundCallback) ? get_class($notFoundCallback) : gettype($notFoundCallback);
67 67
 
68 68
             throw new InvalidArgumentException(
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
             );
71 71
         }
72 72
 
73
-        $autoloader = function ($className) use ($metadataDir, $metadataNamespace, $notFoundCallback) {
73
+        $autoloader = function($className) use ($metadataDir, $metadataNamespace, $notFoundCallback) {
74 74
             if (strpos($className, $metadataNamespace) === 0) {
75 75
                 $file = Autoloader::resolveFile($metadataDir, $metadataNamespace, $className);
76 76
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Factory/ClassMetadataDefinitionFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
     {
27 27
         $definition = $this->createDefinition($className, $parentMetadata);
28 28
 
29
-        if (! class_exists($definition->metadataClassName, false)) {
29
+        if ( ! class_exists($definition->metadataClassName, false)) {
30 30
             $metadataClassPath = $this->resolver->resolveMetadataClassPath($className);
31 31
 
32 32
             $this->generatorStrategy->generate($metadataClassPath, $definition);
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Factory/AbstractClassMetadataFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@
 block discarded – undo
151 151
      */
152 152
     private function getOrCreateClassMetadataDefinition(string $className, ?ClassMetadata $parent) : ClassMetadataDefinition
153 153
     {
154
-        if (! isset($this->definitions[$className])) {
154
+        if ( ! isset($this->definitions[$className])) {
155 155
             $this->definitions[$className] = $this->definitionFactory->build($className, $parent);
156 156
         }
157 157
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Factory/DefaultNamingStrategy.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
      */
40 40
     public function embeddedFieldToColumnName($propertyName, $embeddedColumnName, $className = null, $embeddedClassName = null)
41 41
     {
42
-        return $propertyName . '_' . $embeddedColumnName;
42
+        return $propertyName.'_'.$embeddedColumnName;
43 43
     }
44 44
 
45 45
     /**
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      */
56 56
     public function joinColumnName($propertyName, $className = null)
57 57
     {
58
-        return $propertyName . '_' . $this->referenceColumnName();
58
+        return $propertyName.'_'.$this->referenceColumnName();
59 59
     }
60 60
 
61 61
     /**
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      */
64 64
     public function joinTableName($sourceEntity, $targetEntity, $propertyName = null)
65 65
     {
66
-        return strtolower($this->classToTableName($sourceEntity) . '_' .
66
+        return strtolower($this->classToTableName($sourceEntity).'_'.
67 67
             $this->classToTableName($targetEntity));
68 68
     }
69 69
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      */
73 73
     public function joinKeyColumnName($entityName, $referencedColumnName = null)
74 74
     {
75
-        return strtolower($this->classToTableName($entityName) . '_' .
75
+        return strtolower($this->classToTableName($entityName).'_'.
76 76
             ($referencedColumnName ?: $this->referenceColumnName()));
77 77
     }
78 78
 }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/MappingException.php 1 patch
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
      */
23 23
     public static function pathRequired()
24 24
     {
25
-        return new self('Specifying the paths to your entities is required ' .
25
+        return new self('Specifying the paths to your entities is required '.
26 26
             'in the AnnotationDriver to retrieve all class names.');
27 27
     }
28 28
 
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
      */
213 213
     public static function missingQueryMapping($entity, $queryName)
214 214
     {
215
-        return new self('Query named "' . $queryName . '" in "' . $entity . ' requires a result class or result set mapping.');
215
+        return new self('Query named "'.$queryName.'" in "'.$entity.' requires a result class or result set mapping.');
216 216
     }
217 217
 
218 218
     /**
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
      */
224 224
     public static function missingResultSetMappingEntity($entity, $resultName)
225 225
     {
226
-        return new self('Result set mapping named "' . $resultName . '" in "' . $entity . ' requires a entity class name.');
226
+        return new self('Result set mapping named "'.$resultName.'" in "'.$entity.' requires a entity class name.');
227 227
     }
228 228
 
229 229
     /**
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
      */
235 235
     public static function missingResultSetMappingFieldName($entity, $resultName)
236 236
     {
237
-        return new self('Result set mapping named "' . $resultName . '" in "' . $entity . ' requires a field name.');
237
+        return new self('Result set mapping named "'.$resultName.'" in "'.$entity.' requires a field name.');
238 238
     }
239 239
 
240 240
     /**
@@ -281,8 +281,8 @@  discard block
 block discarded – undo
281 281
     {
282 282
         $message = sprintf("The mapping of field '%s' is invalid: The option '%s' is required.", $field, $expectedOption);
283 283
 
284
-        if (! empty($hint)) {
285
-            $message .= ' (Hint: ' . $hint . ')';
284
+        if ( ! empty($hint)) {
285
+            $message .= ' (Hint: '.$hint.')';
286 286
         }
287 287
 
288 288
         return new self($message);
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
      */
312 312
     public static function reflectionFailure($entity, \ReflectionException $previousException)
313 313
     {
314
-        return new self('An error occurred in ' . $entity, 0, $previousException);
314
+        return new self('An error occurred in '.$entity, 0, $previousException);
315 315
     }
316 316
 
317 317
     /**
@@ -322,8 +322,8 @@  discard block
 block discarded – undo
322 322
      */
323 323
     public static function joinColumnMustPointToMappedField($className, $joinColumn)
324 324
     {
325
-        return new self('The column ' . $joinColumn . ' must be mapped to a field in class '
326
-            . $className . ' since it is referenced by a join column of another class.');
325
+        return new self('The column '.$joinColumn.' must be mapped to a field in class '
326
+            . $className.' since it is referenced by a join column of another class.');
327 327
     }
328 328
 
329 329
     /**
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
      */
358 358
     public static function propertyTypeIsRequired($className, $propertyName)
359 359
     {
360
-        return new self("The attribute 'type' is required for the column description of property " . $className . '::$' . $propertyName . '.');
360
+        return new self("The attribute 'type' is required for the column description of property ".$className.'::$'.$propertyName.'.');
361 361
     }
362 362
 
363 363
     /**
@@ -367,7 +367,7 @@  discard block
 block discarded – undo
367 367
      */
368 368
     public static function tableIdGeneratorNotImplemented($className)
369 369
     {
370
-        return new self('TableIdGenerator is not yet implemented for use with class ' . $className);
370
+        return new self('TableIdGenerator is not yet implemented for use with class '.$className);
371 371
     }
372 372
 
373 373
     /**
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
      */
394 394
     public static function duplicateQueryMapping($entity, $queryName)
395 395
     {
396
-        return new self('Query named "' . $queryName . '" in "' . $entity . '" was already declared, but it must be declared only once');
396
+        return new self('Query named "'.$queryName.'" in "'.$entity.'" was already declared, but it must be declared only once');
397 397
     }
398 398
 
399 399
     /**
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
      */
405 405
     public static function duplicateResultSetMapping($entity, $resultName)
406 406
     {
407
-        return new self('Result set mapping named "' . $resultName . '" in "' . $entity . '" was already declared, but it must be declared only once');
407
+        return new self('Result set mapping named "'.$resultName.'" in "'.$entity.'" was already declared, but it must be declared only once');
408 408
     }
409 409
 
410 410
     /**
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
      */
415 415
     public static function singleIdNotAllowedOnCompositePrimaryKey($entity)
416 416
     {
417
-        return new self('Single id is not allowed on composite primary key in entity ' . $entity);
417
+        return new self('Single id is not allowed on composite primary key in entity '.$entity);
418 418
     }
419 419
 
420 420
     /**
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
424 424
      */
425 425
     public static function noIdDefined($entity)
426 426
     {
427
-        return new self('No ID defined for entity ' . $entity);
427
+        return new self('No ID defined for entity '.$entity);
428 428
     }
429 429
 
430 430
     /**
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
      */
435 435
     public static function unsupportedOptimisticLockingType($unsupportedType)
436 436
     {
437
-        return new self('Locking type "' . $unsupportedType . '" is not supported by Doctrine.');
437
+        return new self('Locking type "'.$unsupportedType.'" is not supported by Doctrine.');
438 438
     }
439 439
 
440 440
     /**
@@ -444,13 +444,13 @@  discard block
 block discarded – undo
444 444
      */
445 445
     public static function fileMappingDriversRequireConfiguredDirectoryPath($path = null)
446 446
     {
447
-        if (! empty($path)) {
448
-            $path = '[' . $path . ']';
447
+        if ( ! empty($path)) {
448
+            $path = '['.$path.']';
449 449
         }
450 450
 
451 451
         return new self(
452
-            'File mapping drivers must have a valid directory path, ' .
453
-            'however the given path ' . $path . ' seems to be incorrect!'
452
+            'File mapping drivers must have a valid directory path, '.
453
+            'however the given path '.$path.' seems to be incorrect!'
454 454
         );
455 455
     }
456 456
 
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
     public static function invalidClassInDiscriminatorMap($className, $owningClass)
467 467
     {
468 468
         return new self(sprintf(
469
-            "Entity class '%s' used in the discriminator map of class '%s' " .
469
+            "Entity class '%s' used in the discriminator map of class '%s' ".
470 470
             'does not exist.',
471 471
             $className,
472 472
             $owningClass
@@ -483,15 +483,15 @@  discard block
 block discarded – undo
483 483
     public static function duplicateDiscriminatorEntry($className, array $entries, array $map)
484 484
     {
485 485
         return new self(
486
-            'The entries ' . implode(', ', $entries) . " in discriminator map of class '" . $className . "' is duplicated. " .
487
-            'If the discriminator map is automatically generated you have to convert it to an explicit discriminator map now. ' .
488
-            'The entries of the current map are: @DiscriminatorMap({' . implode(', ', array_map(
489
-                function ($a, $b) {
486
+            'The entries '.implode(', ', $entries)." in discriminator map of class '".$className."' is duplicated. ".
487
+            'If the discriminator map is automatically generated you have to convert it to an explicit discriminator map now. '.
488
+            'The entries of the current map are: @DiscriminatorMap({'.implode(', ', array_map(
489
+                function($a, $b) {
490 490
                     return sprintf("'%s': '%s'", $a, $b);
491 491
                 },
492 492
                 array_keys($map),
493 493
                 array_values($map)
494
-            )) . '})'
494
+            )).'})'
495 495
         );
496 496
     }
497 497
 
@@ -554,7 +554,7 @@  discard block
 block discarded – undo
554 554
     public static function sqlConversionNotAllowedForPrimaryKeyProperties($className, Property $property)
555 555
     {
556 556
         return new self(sprintf(
557
-            'It is not possible to set id field "%s" to type "%s" in entity class "%s". ' .
557
+            'It is not possible to set id field "%s" to type "%s" in entity class "%s". '.
558 558
             'The type "%s" requires conversion SQL which is not allowed for identifiers.',
559 559
             $property->getName(),
560 560
             $property->getTypeName(),
@@ -590,7 +590,7 @@  discard block
 block discarded – undo
590 590
      */
591 591
     public static function duplicateColumnName($className, $columnName)
592 592
     {
593
-        return new self("Duplicate definition of column '" . $columnName . "' on entity '" . $className . "' in a field or discriminator column mapping.");
593
+        return new self("Duplicate definition of column '".$columnName."' on entity '".$className."' in a field or discriminator column mapping.");
594 594
     }
595 595
 
596 596
     /**
@@ -601,7 +601,7 @@  discard block
 block discarded – undo
601 601
      */
602 602
     public static function illegalToManyAssociationOnMappedSuperclass($className, $field)
603 603
     {
604
-        return new self("It is illegal to put an inverse side one-to-many or many-to-many association on mapped superclass '" . $className . '#' . $field . "'.");
604
+        return new self("It is illegal to put an inverse side one-to-many or many-to-many association on mapped superclass '".$className.'#'.$field."'.");
605 605
     }
606 606
 
607 607
     /**
@@ -613,8 +613,8 @@  discard block
 block discarded – undo
613 613
      */
614 614
     public static function cannotMapCompositePrimaryKeyEntitiesAsForeignId($className, $targetEntity, $targetField)
615 615
     {
616
-        return new self("It is not possible to map entity '" . $className . "' with a composite primary key " .
617
-            "as part of the primary key of another entity '" . $targetEntity . '#' . $targetField . "'.");
616
+        return new self("It is not possible to map entity '".$className."' with a composite primary key ".
617
+            "as part of the primary key of another entity '".$targetEntity.'#'.$targetField."'.");
618 618
     }
619 619
 
620 620
     /**
@@ -668,8 +668,8 @@  discard block
 block discarded – undo
668 668
      */
669 669
     public static function illegalOrphanRemoval($className, $field)
670 670
     {
671
-        return new self('Orphan removal is only allowed on one-to-one and one-to-many ' .
672
-            'associations, but ' . $className . '#' . $field . ' is not.');
671
+        return new self('Orphan removal is only allowed on one-to-one and one-to-many '.
672
+            'associations, but '.$className.'#'.$field.' is not.');
673 673
     }
674 674
 
675 675
     /**
@@ -701,7 +701,7 @@  discard block
 block discarded – undo
701 701
      */
702 702
     public static function noInheritanceOnMappedSuperClass($className)
703 703
     {
704
-        return new self("It is not supported to define inheritance information on a mapped superclass '" . $className . "'.");
704
+        return new self("It is not supported to define inheritance information on a mapped superclass '".$className."'.");
705 705
     }
706 706
 
707 707
     /**
@@ -713,8 +713,8 @@  discard block
 block discarded – undo
713 713
     public static function mappedClassNotPartOfDiscriminatorMap($className, $rootClassName)
714 714
     {
715 715
         return new self(
716
-            "Entity '" . $className . "' has to be part of the discriminator map of '" . $rootClassName . "' " .
717
-            "to be properly mapped in the inheritance hierarchy. Alternatively you can make '" . $className . "' an abstract class " .
716
+            "Entity '".$className."' has to be part of the discriminator map of '".$rootClassName."' ".
717
+            "to be properly mapped in the inheritance hierarchy. Alternatively you can make '".$className."' an abstract class ".
718 718
             'to avoid this exception from occurring.'
719 719
         );
720 720
     }
@@ -727,7 +727,7 @@  discard block
 block discarded – undo
727 727
      */
728 728
     public static function lifecycleCallbackMethodNotFound($className, $methodName)
729 729
     {
730
-        return new self("Entity '" . $className . "' has no method '" . $methodName . "' to be registered as lifecycle callback.");
730
+        return new self("Entity '".$className."' has no method '".$methodName."' to be registered as lifecycle callback.");
731 731
     }
732 732
 
733 733
     /**
@@ -773,7 +773,7 @@  discard block
 block discarded – undo
773 773
      */
774 774
     public static function invalidFetchMode($className, $annotation)
775 775
     {
776
-        return new self("Entity '" . $className . "' has a mapping with invalid fetch mode '" . $annotation . "'");
776
+        return new self("Entity '".$className."' has a mapping with invalid fetch mode '".$annotation."'");
777 777
     }
778 778
 
779 779
     /**
@@ -783,7 +783,7 @@  discard block
 block discarded – undo
783 783
      */
784 784
     public static function compositeKeyAssignedIdGeneratorRequired($className)
785 785
     {
786
-        return new self("Entity '" . $className . "' has a composite identifier but uses an ID generator other than manually assigning (Identity, Sequence). This is not supported.");
786
+        return new self("Entity '".$className."' has a composite identifier but uses an ID generator other than manually assigning (Identity, Sequence). This is not supported.");
787 787
     }
788 788
 
789 789
     /**
@@ -795,7 +795,7 @@  discard block
 block discarded – undo
795 795
      */
796 796
     public static function invalidTargetEntityClass($targetEntity, $sourceEntity, $associationName)
797 797
     {
798
-        return new self("The target-entity '" . $targetEntity . "' cannot be found in '" . $sourceEntity . '#' . $associationName . "'.");
798
+        return new self("The target-entity '".$targetEntity."' cannot be found in '".$sourceEntity.'#'.$associationName."'.");
799 799
     }
800 800
 
801 801
     /**
@@ -807,8 +807,8 @@  discard block
 block discarded – undo
807 807
      */
808 808
     public static function invalidCascadeOption(array $cascades, $className, $propertyName)
809 809
     {
810
-        $cascades = implode(', ', array_map(function ($e) {
811
-            return "'" . $e . "'";
810
+        $cascades = implode(', ', array_map(function($e) {
811
+            return "'".$e."'";
812 812
         }, $cascades));
813 813
 
814 814
         return new self(sprintf(
@@ -841,7 +841,7 @@  discard block
 block discarded – undo
841 841
     {
842 842
         return new self(
843 843
             sprintf(
844
-                'Infinite nesting detected for embedded property %s::%s. ' .
844
+                'Infinite nesting detected for embedded property %s::%s. '.
845 845
                 'You cannot embed an embeddable from the same type inside an embeddable.',
846 846
                 $className,
847 847
                 $propertyName
@@ -856,7 +856,7 @@  discard block
 block discarded – undo
856 856
     {
857 857
         return new self(
858 858
             sprintf(
859
-                'Class %s not found in namespaces %s.' .
859
+                'Class %s not found in namespaces %s.'.
860 860
                 $className,
861 861
                 implode(', ', $namespaces)
862 862
             )
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/ClassMetadata.php 1 patch
Spacing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
      */
263 263
     public function __toString()
264 264
     {
265
-        return __CLASS__ . '@' . spl_object_id($this);
265
+        return __CLASS__.'@'.spl_object_id($this);
266 266
     }
267 267
 
268 268
     /**
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
         // Restore ReflectionClass and properties
350 350
         $this->reflectionClass = $reflectionService->getClass($this->className);
351 351
 
352
-        if (! $this->reflectionClass) {
352
+        if ( ! $this->reflectionClass) {
353 353
             return;
354 354
         }
355 355
 
@@ -373,11 +373,11 @@  discard block
 block discarded – undo
373 373
         }
374 374
 
375 375
         // Verify & complete identifier mapping
376
-        if (! $this->identifier) {
376
+        if ( ! $this->identifier) {
377 377
             throw MappingException::identifierRequired($this->className);
378 378
         }
379 379
 
380
-        $explicitlyGeneratedProperties = array_filter($this->declaredProperties, function (Property $property) : bool {
380
+        $explicitlyGeneratedProperties = array_filter($this->declaredProperties, function(Property $property) : bool {
381 381
             return $property instanceof FieldMetadata
382 382
                 && $property->isPrimaryKey()
383 383
                 && $property->hasValueGenerator();
@@ -396,14 +396,14 @@  discard block
 block discarded – undo
396 396
     public function validateAssociations() : void
397 397
     {
398 398
         array_map(
399
-            function (Property $property) {
400
-                if (! ($property instanceof AssociationMetadata)) {
399
+            function(Property $property) {
400
+                if ( ! ($property instanceof AssociationMetadata)) {
401 401
                     return;
402 402
                 }
403 403
 
404 404
                 $targetEntity = $property->getTargetEntity();
405 405
 
406
-                if (! class_exists($targetEntity)) {
406
+                if ( ! class_exists($targetEntity)) {
407 407
                     throw MappingException::invalidTargetEntityClass($targetEntity, $this->className, $property->getName());
408 408
                 }
409 409
             },
@@ -421,7 +421,7 @@  discard block
 block discarded – undo
421 421
         foreach ($this->lifecycleCallbacks as $callbacks) {
422 422
             /** @var array $callbacks */
423 423
             foreach ($callbacks as $callbackFuncName) {
424
-                if (! $reflectionService->hasPublicMethod($this->className, $callbackFuncName)) {
424
+                if ( ! $reflectionService->hasPublicMethod($this->className, $callbackFuncName)) {
425 425
                     throw MappingException::lifecycleCallbackMethodNotFound($this->className, $callbackFuncName);
426 426
                 }
427 427
             }
@@ -445,11 +445,11 @@  discard block
 block discarded – undo
445 445
      */
446 446
     public function isIdentifier(string $fieldName) : bool
447 447
     {
448
-        if (! $this->identifier) {
448
+        if ( ! $this->identifier) {
449 449
             return false;
450 450
         }
451 451
 
452
-        if (! $this->isIdentifierComposite()) {
452
+        if ( ! $this->isIdentifierComposite()) {
453 453
             return $fieldName === $this->identifier[0];
454 454
         }
455 455
 
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
             $property->setColumnName($columnName);
478 478
         }
479 479
 
480
-        if (! $this->isMappedSuperclass) {
480
+        if ( ! $this->isMappedSuperclass) {
481 481
             $property->setTableName($this->getTableName());
482 482
         }
483 483
 
@@ -497,7 +497,7 @@  discard block
 block discarded – undo
497 497
                 throw MappingException::sqlConversionNotAllowedForPrimaryKeyProperties($this->className, $property);
498 498
             }
499 499
 
500
-            if (! in_array($fieldName, $this->identifier, true)) {
500
+            if ( ! in_array($fieldName, $this->identifier, true)) {
501 501
                 $this->identifier[] = $fieldName;
502 502
             }
503 503
         }
@@ -547,7 +547,7 @@  discard block
 block discarded – undo
547 547
         $fieldName    = $property->getName();
548 548
         $targetEntity = $property->getTargetEntity();
549 549
 
550
-        if (! $targetEntity) {
550
+        if ( ! $targetEntity) {
551 551
             throw MappingException::missingTargetEntity($fieldName);
552 552
         }
553 553
 
@@ -560,7 +560,7 @@  discard block
 block discarded – undo
560 560
                 throw MappingException::illegalOrphanRemovalOnIdentifierAssociation($this->className, $fieldName);
561 561
             }
562 562
 
563
-            if (! in_array($property->getName(), $this->identifier, true)) {
563
+            if ( ! in_array($property->getName(), $this->identifier, true)) {
564 564
                 if ($property instanceof ToOneAssociationMetadata && count($property->getJoinColumns()) >= 2) {
565 565
                     throw MappingException::cannotMapCompositePrimaryKeyEntitiesAsForeignId(
566 566
                         $property->getTargetEntity(),
@@ -622,7 +622,7 @@  discard block
 block discarded – undo
622 622
                 /** @var JoinColumnMetadata $joinColumn */
623 623
                 if ($property instanceof OneToOneAssociationMetadata && $this->inheritanceType !== InheritanceType::SINGLE_TABLE) {
624 624
                     if (count($property->getJoinColumns()) === 1) {
625
-                        if (! $property->isPrimaryKey()) {
625
+                        if ( ! $property->isPrimaryKey()) {
626 626
                             $joinColumn->setUnique(true);
627 627
                         }
628 628
                     } else {
@@ -630,13 +630,13 @@  discard block
 block discarded – undo
630 630
                     }
631 631
                 }
632 632
 
633
-                $joinColumn->setTableName(! $this->isMappedSuperclass ? $this->getTableName() : null);
633
+                $joinColumn->setTableName( ! $this->isMappedSuperclass ? $this->getTableName() : null);
634 634
 
635
-                if (! $joinColumn->getColumnName()) {
635
+                if ( ! $joinColumn->getColumnName()) {
636 636
                     $joinColumn->setColumnName($this->namingStrategy->joinColumnName($fieldName, $this->className));
637 637
                 }
638 638
 
639
-                if (! $joinColumn->getReferencedColumnName()) {
639
+                if ( ! $joinColumn->getReferencedColumnName()) {
640 640
                     $joinColumn->setReferencedColumnName($this->namingStrategy->referenceColumnName());
641 641
                 }
642 642
 
@@ -644,7 +644,7 @@  discard block
 block discarded – undo
644 644
             }
645 645
 
646 646
             if ($uniqueConstraintColumns) {
647
-                if (! $this->table) {
647
+                if ( ! $this->table) {
648 648
                     throw new \RuntimeException(
649 649
                         'ClassMetadata::setTable() has to be called before defining a one to one relationship.'
650 650
                     );
@@ -664,7 +664,7 @@  discard block
 block discarded – undo
664 664
         if ($property->isOrphanRemoval()) {
665 665
             $cascades = $property->getCascade();
666 666
 
667
-            if (! in_array('remove', $cascades, true)) {
667
+            if ( ! in_array('remove', $cascades, true)) {
668 668
                 $cascades[] = 'remove';
669 669
 
670 670
                 $property->setCascade($cascades);
@@ -727,14 +727,14 @@  discard block
 block discarded – undo
727 727
     protected function validateAndCompleteOneToManyMapping(OneToManyAssociationMetadata $property)
728 728
     {
729 729
         // OneToMany MUST have mappedBy
730
-        if (! $property->getMappedBy()) {
730
+        if ( ! $property->getMappedBy()) {
731 731
             throw MappingException::oneToManyRequiresMappedBy($property->getName());
732 732
         }
733 733
 
734 734
         if ($property->isOrphanRemoval()) {
735 735
             $cascades = $property->getCascade();
736 736
 
737
-            if (! in_array('remove', $cascades, true)) {
737
+            if ( ! in_array('remove', $cascades, true)) {
738 738
                 $cascades[] = 'remove';
739 739
 
740 740
                 $property->setCascade($cascades);
@@ -757,7 +757,7 @@  discard block
 block discarded – undo
757 757
 
758 758
             $property->setJoinTable($joinTable);
759 759
 
760
-            if (! $joinTable->getName()) {
760
+            if ( ! $joinTable->getName()) {
761 761
                 $joinTableName = $this->namingStrategy->joinTableName(
762 762
                     $property->getSourceEntity(),
763 763
                     $property->getTargetEntity(),
@@ -769,7 +769,7 @@  discard block
 block discarded – undo
769 769
 
770 770
             $selfReferencingEntityWithoutJoinColumns = $property->getSourceEntity() === $property->getTargetEntity() && ! $joinTable->hasColumns();
771 771
 
772
-            if (! $joinTable->getJoinColumns()) {
772
+            if ( ! $joinTable->getJoinColumns()) {
773 773
                 $referencedColumnName = $this->namingStrategy->referenceColumnName();
774 774
                 $sourceReferenceName  = $selfReferencingEntityWithoutJoinColumns ? 'source' : $referencedColumnName;
775 775
                 $columnName           = $this->namingStrategy->joinKeyColumnName($property->getSourceEntity(), $sourceReferenceName);
@@ -782,7 +782,7 @@  discard block
 block discarded – undo
782 782
                 $joinTable->addJoinColumn($joinColumn);
783 783
             }
784 784
 
785
-            if (! $joinTable->getInverseJoinColumns()) {
785
+            if ( ! $joinTable->getInverseJoinColumns()) {
786 786
                 $referencedColumnName = $this->namingStrategy->referenceColumnName();
787 787
                 $targetReferenceName  = $selfReferencingEntityWithoutJoinColumns ? 'target' : $referencedColumnName;
788 788
                 $columnName           = $this->namingStrategy->joinKeyColumnName($property->getTargetEntity(), $targetReferenceName);
@@ -797,13 +797,13 @@  discard block
 block discarded – undo
797 797
 
798 798
             foreach ($joinTable->getJoinColumns() as $joinColumn) {
799 799
                 /** @var JoinColumnMetadata $joinColumn */
800
-                if (! $joinColumn->getReferencedColumnName()) {
800
+                if ( ! $joinColumn->getReferencedColumnName()) {
801 801
                     $joinColumn->setReferencedColumnName($this->namingStrategy->referenceColumnName());
802 802
                 }
803 803
 
804 804
                 $referencedColumnName = $joinColumn->getReferencedColumnName();
805 805
 
806
-                if (! $joinColumn->getColumnName()) {
806
+                if ( ! $joinColumn->getColumnName()) {
807 807
                     $columnName = $this->namingStrategy->joinKeyColumnName(
808 808
                         $property->getSourceEntity(),
809 809
                         $referencedColumnName
@@ -815,13 +815,13 @@  discard block
 block discarded – undo
815 815
 
816 816
             foreach ($joinTable->getInverseJoinColumns() as $inverseJoinColumn) {
817 817
                 /** @var JoinColumnMetadata $inverseJoinColumn */
818
-                if (! $inverseJoinColumn->getReferencedColumnName()) {
818
+                if ( ! $inverseJoinColumn->getReferencedColumnName()) {
819 819
                     $inverseJoinColumn->setReferencedColumnName($this->namingStrategy->referenceColumnName());
820 820
                 }
821 821
 
822 822
                 $referencedColumnName = $inverseJoinColumn->getReferencedColumnName();
823 823
 
824
-                if (! $inverseJoinColumn->getColumnName()) {
824
+                if ( ! $inverseJoinColumn->getColumnName()) {
825 825
                     $columnName = $this->namingStrategy->joinKeyColumnName(
826 826
                         $property->getTargetEntity(),
827 827
                         $referencedColumnName
@@ -855,7 +855,7 @@  discard block
 block discarded – undo
855 855
             throw MappingException::singleIdNotAllowedOnCompositePrimaryKey($this->className);
856 856
         }
857 857
 
858
-        if (! isset($this->identifier[0])) {
858
+        if ( ! isset($this->identifier[0])) {
859 859
             throw MappingException::noIdDefined($this->className);
860 860
         }
861 861
 
@@ -914,7 +914,7 @@  discard block
 block discarded – undo
914 914
             // Association defined as Id field
915 915
             $targetClass = $em->getClassMetadata($property->getTargetEntity());
916 916
 
917
-            if (! $property->isOwningSide()) {
917
+            if ( ! $property->isOwningSide()) {
918 918
                 $property    = $targetClass->getProperty($property->getMappedBy());
919 919
                 $targetClass = $em->getClassMetadata($property->getTargetEntity());
920 920
             }
@@ -929,7 +929,7 @@  discard block
 block discarded – undo
929 929
                 $columnName           = $joinColumn->getColumnName();
930 930
                 $referencedColumnName = $joinColumn->getReferencedColumnName();
931 931
 
932
-                if (! $joinColumn->getType()) {
932
+                if ( ! $joinColumn->getType()) {
933 933
                     $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $em));
934 934
                 }
935 935
 
@@ -963,11 +963,11 @@  discard block
 block discarded – undo
963 963
     {
964 964
         $schema = $this->getSchemaName() === null
965 965
             ? ''
966
-            : $this->getSchemaName() . '_'
966
+            : $this->getSchemaName().'_'
967 967
         ;
968 968
 
969 969
         // replace dots with underscores because PostgreSQL creates temporary tables in a special schema
970
-        return $schema . $this->getTableName() . '_id_tmp';
970
+        return $schema.$this->getTableName().'_id_tmp';
971 971
     }
972 972
 
973 973
     /**
@@ -1001,7 +1001,7 @@  discard block
 block discarded – undo
1001 1001
      */
1002 1002
     public function setInheritanceType($type) : void
1003 1003
     {
1004
-        if (! $this->isInheritanceType($type)) {
1004
+        if ( ! $this->isInheritanceType($type)) {
1005 1005
             throw MappingException::invalidInheritanceType($this->className, $type);
1006 1006
         }
1007 1007
 
@@ -1019,7 +1019,7 @@  discard block
 block discarded – undo
1019 1019
     {
1020 1020
         $fieldName = $property->getName();
1021 1021
 
1022
-        if (! isset($this->declaredProperties[$fieldName])) {
1022
+        if ( ! isset($this->declaredProperties[$fieldName])) {
1023 1023
             throw MappingException::invalidOverrideFieldName($this->className, $fieldName);
1024 1024
         }
1025 1025
 
@@ -1216,7 +1216,7 @@  discard block
 block discarded – undo
1216 1216
         $declaringClass    = $property->getDeclaringClass();
1217 1217
 
1218 1218
         if ($inheritedProperty instanceof FieldMetadata) {
1219
-            if (! $declaringClass->isMappedSuperclass) {
1219
+            if ( ! $declaringClass->isMappedSuperclass) {
1220 1220
                 $inheritedProperty->setTableName($property->getTableName());
1221 1221
             }
1222 1222
 
@@ -1327,11 +1327,11 @@  discard block
 block discarded – undo
1327 1327
             'method' => $method,
1328 1328
         ];
1329 1329
 
1330
-        if (! class_exists($class)) {
1330
+        if ( ! class_exists($class)) {
1331 1331
             throw MappingException::entityListenerClassNotFound($class, $this->className);
1332 1332
         }
1333 1333
 
1334
-        if (! method_exists($class, $method)) {
1334
+        if ( ! method_exists($class, $method)) {
1335 1335
             throw MappingException::entityListenerMethodNotFound($class, $method, $this->className);
1336 1336
         }
1337 1337
 
@@ -1398,7 +1398,7 @@  discard block
 block discarded – undo
1398 1398
             return;
1399 1399
         }
1400 1400
 
1401
-        if (! (class_exists($className) || interface_exists($className))) {
1401
+        if ( ! (class_exists($className) || interface_exists($className))) {
1402 1402
             throw MappingException::invalidClassInDiscriminatorMap($className, $this->className);
1403 1403
         }
1404 1404
 
Please login to merge, or discard this patch.