Failed Conditions
Push — master ( d72936...c14dbc )
by Marco
14:31 queued 08:42
created
lib/Doctrine/ORM/Mapping/Exporter/VariableExporter.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Mapping\Exporter;
6 6
 
@@ -11,30 +11,30 @@  discard block
 block discarded – undo
11 11
      */
12 12
     public function export($value, int $indentationLevel = 0) : string
13 13
     {
14
-        if (! is_array($value)) {
14
+        if ( ! is_array($value)) {
15 15
             return var_export($value, true);
16 16
         }
17 17
 
18 18
         $indentation = str_repeat(self::INDENTATION, $indentationLevel);
19
-        $longestKey  = array_reduce(array_keys($value), function ($k, $v) {
19
+        $longestKey  = array_reduce(array_keys($value), function($k, $v) {
20 20
             return (string) (strlen((string) $k) > strlen((string) $v) ? $k : $v);
21 21
         });
22 22
         $maxKeyLength = strlen($longestKey) + (is_numeric($longestKey) ? 0 : 2);
23 23
 
24 24
         $lines = [];
25 25
 
26
-        $lines[] = $indentation . '[';
26
+        $lines[] = $indentation.'[';
27 27
 
28 28
         foreach ($value as $entryKey => $entryValue) {
29 29
             $lines[] = sprintf(
30 30
                 '%s%s => %s,',
31
-                $indentation . self::INDENTATION,
31
+                $indentation.self::INDENTATION,
32 32
                 str_pad(var_export($entryKey, true), $maxKeyLength),
33 33
                 ltrim($this->export($entryValue, $indentationLevel + 1))
34 34
             );
35 35
         }
36 36
 
37
-        $lines[] = $indentation . ']';
37
+        $lines[] = $indentation.']';
38 38
 
39 39
         return implode(PHP_EOL, $lines);
40 40
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/MappingException.php 1 patch
Spacing   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Mapping;
6 6
 
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
      */
17 17
     public static function pathRequired()
18 18
     {
19
-        return new self('Specifying the paths to your entities is required ' .
19
+        return new self('Specifying the paths to your entities is required '.
20 20
             'in the AnnotationDriver to retrieve all class names.');
21 21
     }
22 22
 
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
      */
207 207
     public static function missingQueryMapping($entity, $queryName)
208 208
     {
209
-        return new self('Query named "' . $queryName . '" in "' . $entity . ' requires a result class or result set mapping.');
209
+        return new self('Query named "'.$queryName.'" in "'.$entity.' requires a result class or result set mapping.');
210 210
     }
211 211
 
212 212
     /**
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
      */
218 218
     public static function missingResultSetMappingEntity($entity, $resultName)
219 219
     {
220
-        return new self('Result set mapping named "' . $resultName . '" in "' . $entity . ' requires a entity class name.');
220
+        return new self('Result set mapping named "'.$resultName.'" in "'.$entity.' requires a entity class name.');
221 221
     }
222 222
 
223 223
     /**
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
      */
229 229
     public static function missingResultSetMappingFieldName($entity, $resultName)
230 230
     {
231
-        return new self('Result set mapping named "' . $resultName . '" in "' . $entity . ' requires a field name.');
231
+        return new self('Result set mapping named "'.$resultName.'" in "'.$entity.' requires a field name.');
232 232
     }
233 233
 
234 234
     /**
@@ -275,8 +275,8 @@  discard block
 block discarded – undo
275 275
     {
276 276
         $message = sprintf("The mapping of field '%s' is invalid: The option '%s' is required.", $field, $expectedOption);
277 277
 
278
-        if (! empty($hint)) {
279
-            $message .= ' (Hint: ' . $hint . ')';
278
+        if ( ! empty($hint)) {
279
+            $message .= ' (Hint: '.$hint.')';
280 280
         }
281 281
 
282 282
         return new self($message);
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
      */
306 306
     public static function reflectionFailure($entity, \ReflectionException $previousException)
307 307
     {
308
-        return new self('An error occurred in ' . $entity, 0, $previousException);
308
+        return new self('An error occurred in '.$entity, 0, $previousException);
309 309
     }
310 310
 
311 311
     /**
@@ -316,8 +316,8 @@  discard block
 block discarded – undo
316 316
      */
317 317
     public static function joinColumnMustPointToMappedField($className, $joinColumn)
318 318
     {
319
-        return new self('The column ' . $joinColumn . ' must be mapped to a field in class '
320
-            . $className . ' since it is referenced by a join column of another class.');
319
+        return new self('The column '.$joinColumn.' must be mapped to a field in class '
320
+            . $className.' since it is referenced by a join column of another class.');
321 321
     }
322 322
 
323 323
     /**
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
      */
352 352
     public static function propertyTypeIsRequired($className, $propertyName)
353 353
     {
354
-        return new self("The attribute 'type' is required for the column description of property " . $className . '::$' . $propertyName . '.');
354
+        return new self("The attribute 'type' is required for the column description of property ".$className.'::$'.$propertyName.'.');
355 355
     }
356 356
 
357 357
     /**
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
      */
362 362
     public static function tableIdGeneratorNotImplemented($className)
363 363
     {
364
-        return new self('TableIdGenerator is not yet implemented for use with class ' . $className);
364
+        return new self('TableIdGenerator is not yet implemented for use with class '.$className);
365 365
     }
366 366
 
367 367
     /**
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
      */
388 388
     public static function duplicateQueryMapping($entity, $queryName)
389 389
     {
390
-        return new self('Query named "' . $queryName . '" in "' . $entity . '" was already declared, but it must be declared only once');
390
+        return new self('Query named "'.$queryName.'" in "'.$entity.'" was already declared, but it must be declared only once');
391 391
     }
392 392
 
393 393
     /**
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
      */
399 399
     public static function duplicateResultSetMapping($entity, $resultName)
400 400
     {
401
-        return new self('Result set mapping named "' . $resultName . '" in "' . $entity . '" was already declared, but it must be declared only once');
401
+        return new self('Result set mapping named "'.$resultName.'" in "'.$entity.'" was already declared, but it must be declared only once');
402 402
     }
403 403
 
404 404
     /**
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
      */
409 409
     public static function singleIdNotAllowedOnCompositePrimaryKey($entity)
410 410
     {
411
-        return new self('Single id is not allowed on composite primary key in entity ' . $entity);
411
+        return new self('Single id is not allowed on composite primary key in entity '.$entity);
412 412
     }
413 413
 
414 414
     /**
@@ -418,7 +418,7 @@  discard block
 block discarded – undo
418 418
      */
419 419
     public static function noIdDefined($entity)
420 420
     {
421
-        return new self('No ID defined for entity ' . $entity);
421
+        return new self('No ID defined for entity '.$entity);
422 422
     }
423 423
 
424 424
     /**
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
      */
429 429
     public static function unsupportedOptimisticLockingType($unsupportedType)
430 430
     {
431
-        return new self('Locking type "' . $unsupportedType . '" is not supported by Doctrine.');
431
+        return new self('Locking type "'.$unsupportedType.'" is not supported by Doctrine.');
432 432
     }
433 433
 
434 434
     /**
@@ -438,13 +438,13 @@  discard block
 block discarded – undo
438 438
      */
439 439
     public static function fileMappingDriversRequireConfiguredDirectoryPath($path = null)
440 440
     {
441
-        if (! empty($path)) {
442
-            $path = '[' . $path . ']';
441
+        if ( ! empty($path)) {
442
+            $path = '['.$path.']';
443 443
         }
444 444
 
445 445
         return new self(
446
-            'File mapping drivers must have a valid directory path, ' .
447
-            'however the given path ' . $path . ' seems to be incorrect!'
446
+            'File mapping drivers must have a valid directory path, '.
447
+            'however the given path '.$path.' seems to be incorrect!'
448 448
         );
449 449
     }
450 450
 
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
     public static function invalidClassInDiscriminatorMap($className, $owningClass)
461 461
     {
462 462
         return new self(sprintf(
463
-            "Entity class '%s' used in the discriminator map of class '%s' " .
463
+            "Entity class '%s' used in the discriminator map of class '%s' ".
464 464
             'does not exist.',
465 465
             $className,
466 466
             $owningClass
@@ -477,15 +477,15 @@  discard block
 block discarded – undo
477 477
     public static function duplicateDiscriminatorEntry($className, array $entries, array $map)
478 478
     {
479 479
         return new self(
480
-            'The entries ' . implode(', ', $entries) . " in discriminator map of class '" . $className . "' is duplicated. " .
481
-            'If the discriminator map is automatically generated you have to convert it to an explicit discriminator map now. ' .
482
-            'The entries of the current map are: @DiscriminatorMap({' . implode(', ', array_map(
483
-                function ($a, $b) {
480
+            'The entries '.implode(', ', $entries)." in discriminator map of class '".$className."' is duplicated. ".
481
+            'If the discriminator map is automatically generated you have to convert it to an explicit discriminator map now. '.
482
+            'The entries of the current map are: @DiscriminatorMap({'.implode(', ', array_map(
483
+                function($a, $b) {
484 484
                     return sprintf("'%s': '%s'", $a, $b);
485 485
                 },
486 486
                 array_keys($map),
487 487
                 array_values($map)
488
-            )) . '})'
488
+            )).'})'
489 489
         );
490 490
     }
491 491
 
@@ -548,7 +548,7 @@  discard block
 block discarded – undo
548 548
     public static function sqlConversionNotAllowedForPrimaryKeyProperties($className, Property $property)
549 549
     {
550 550
         return new self(sprintf(
551
-            'It is not possible to set id field "%s" to type "%s" in entity class "%s". ' .
551
+            'It is not possible to set id field "%s" to type "%s" in entity class "%s". '.
552 552
             'The type "%s" requires conversion SQL which is not allowed for identifiers.',
553 553
             $property->getName(),
554 554
             $property->getTypeName(),
@@ -584,7 +584,7 @@  discard block
 block discarded – undo
584 584
      */
585 585
     public static function duplicateColumnName($className, $columnName)
586 586
     {
587
-        return new self("Duplicate definition of column '" . $columnName . "' on entity '" . $className . "' in a field or discriminator column mapping.");
587
+        return new self("Duplicate definition of column '".$columnName."' on entity '".$className."' in a field or discriminator column mapping.");
588 588
     }
589 589
 
590 590
     /**
@@ -595,7 +595,7 @@  discard block
 block discarded – undo
595 595
      */
596 596
     public static function illegalToManyAssociationOnMappedSuperclass($className, $field)
597 597
     {
598
-        return new self("It is illegal to put an inverse side one-to-many or many-to-many association on mapped superclass '" . $className . '#' . $field . "'.");
598
+        return new self("It is illegal to put an inverse side one-to-many or many-to-many association on mapped superclass '".$className.'#'.$field."'.");
599 599
     }
600 600
 
601 601
     /**
@@ -607,8 +607,8 @@  discard block
 block discarded – undo
607 607
      */
608 608
     public static function cannotMapCompositePrimaryKeyEntitiesAsForeignId($className, $targetEntity, $targetField)
609 609
     {
610
-        return new self("It is not possible to map entity '" . $className . "' with a composite primary key " .
611
-            "as part of the primary key of another entity '" . $targetEntity . '#' . $targetField . "'.");
610
+        return new self("It is not possible to map entity '".$className."' with a composite primary key ".
611
+            "as part of the primary key of another entity '".$targetEntity.'#'.$targetField."'.");
612 612
     }
613 613
 
614 614
     /**
@@ -662,8 +662,8 @@  discard block
 block discarded – undo
662 662
      */
663 663
     public static function illegalOrphanRemoval($className, $field)
664 664
     {
665
-        return new self('Orphan removal is only allowed on one-to-one and one-to-many ' .
666
-            'associations, but ' . $className . '#' . $field . ' is not.');
665
+        return new self('Orphan removal is only allowed on one-to-one and one-to-many '.
666
+            'associations, but '.$className.'#'.$field.' is not.');
667 667
     }
668 668
 
669 669
     /**
@@ -695,7 +695,7 @@  discard block
 block discarded – undo
695 695
      */
696 696
     public static function noInheritanceOnMappedSuperClass($className)
697 697
     {
698
-        return new self("It is not supported to define inheritance information on a mapped superclass '" . $className . "'.");
698
+        return new self("It is not supported to define inheritance information on a mapped superclass '".$className."'.");
699 699
     }
700 700
 
701 701
     /**
@@ -707,8 +707,8 @@  discard block
 block discarded – undo
707 707
     public static function mappedClassNotPartOfDiscriminatorMap($className, $rootClassName)
708 708
     {
709 709
         return new self(
710
-            "Entity '" . $className . "' has to be part of the discriminator map of '" . $rootClassName . "' " .
711
-            "to be properly mapped in the inheritance hierarchy. Alternatively you can make '" . $className . "' an abstract class " .
710
+            "Entity '".$className."' has to be part of the discriminator map of '".$rootClassName."' ".
711
+            "to be properly mapped in the inheritance hierarchy. Alternatively you can make '".$className."' an abstract class ".
712 712
             'to avoid this exception from occurring.'
713 713
         );
714 714
     }
@@ -721,7 +721,7 @@  discard block
 block discarded – undo
721 721
      */
722 722
     public static function lifecycleCallbackMethodNotFound($className, $methodName)
723 723
     {
724
-        return new self("Entity '" . $className . "' has no method '" . $methodName . "' to be registered as lifecycle callback.");
724
+        return new self("Entity '".$className."' has no method '".$methodName."' to be registered as lifecycle callback.");
725 725
     }
726 726
 
727 727
     /**
@@ -767,7 +767,7 @@  discard block
 block discarded – undo
767 767
      */
768 768
     public static function invalidFetchMode($className, $annotation)
769 769
     {
770
-        return new self("Entity '" . $className . "' has a mapping with invalid fetch mode '" . $annotation . "'");
770
+        return new self("Entity '".$className."' has a mapping with invalid fetch mode '".$annotation."'");
771 771
     }
772 772
 
773 773
     /**
@@ -777,7 +777,7 @@  discard block
 block discarded – undo
777 777
      */
778 778
     public static function compositeKeyAssignedIdGeneratorRequired($className)
779 779
     {
780
-        return new self("Entity '" . $className . "' has a composite identifier but uses an ID generator other than manually assigning (Identity, Sequence). This is not supported.");
780
+        return new self("Entity '".$className."' has a composite identifier but uses an ID generator other than manually assigning (Identity, Sequence). This is not supported.");
781 781
     }
782 782
 
783 783
     /**
@@ -789,7 +789,7 @@  discard block
 block discarded – undo
789 789
      */
790 790
     public static function invalidTargetEntityClass($targetEntity, $sourceEntity, $associationName)
791 791
     {
792
-        return new self("The target-entity '" . $targetEntity . "' cannot be found in '" . $sourceEntity . '#' . $associationName . "'.");
792
+        return new self("The target-entity '".$targetEntity."' cannot be found in '".$sourceEntity.'#'.$associationName."'.");
793 793
     }
794 794
 
795 795
     /**
@@ -801,8 +801,8 @@  discard block
 block discarded – undo
801 801
      */
802 802
     public static function invalidCascadeOption(array $cascades, $className, $propertyName)
803 803
     {
804
-        $cascades = implode(', ', array_map(function ($e) {
805
-            return "'" . $e . "'";
804
+        $cascades = implode(', ', array_map(function($e) {
805
+            return "'".$e."'";
806 806
         }, $cascades));
807 807
 
808 808
         return new self(sprintf(
@@ -835,7 +835,7 @@  discard block
 block discarded – undo
835 835
     {
836 836
         return new self(
837 837
             sprintf(
838
-                'Infinite nesting detected for embedded property %s::%s. ' .
838
+                'Infinite nesting detected for embedded property %s::%s. '.
839 839
                 'You cannot embed an embeddable from the same type inside an embeddable.',
840 840
                 $className,
841 841
                 $propertyName
@@ -850,7 +850,7 @@  discard block
 block discarded – undo
850 850
     {
851 851
         return new self(
852 852
             sprintf(
853
-                'Class %s not found in namespaces %s.' .
853
+                'Class %s not found in namespaces %s.'.
854 854
                 $className,
855 855
                 implode(', ', $namespaces)
856 856
             )
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/ClassMetadata.php 1 patch
Spacing   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Mapping;
6 6
 
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
      */
281 281
     public function __toString()
282 282
     {
283
-        return __CLASS__ . '@' . spl_object_id($this);
283
+        return __CLASS__.'@'.spl_object_id($this);
284 284
     }
285 285
 
286 286
     /**
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
         // Restore ReflectionClass and properties
376 376
         $this->reflectionClass = $reflectionService->getClass($this->className);
377 377
 
378
-        if (! $this->reflectionClass) {
378
+        if ( ! $this->reflectionClass) {
379 379
             return;
380 380
         }
381 381
 
@@ -399,11 +399,11 @@  discard block
 block discarded – undo
399 399
         }
400 400
 
401 401
         // Verify & complete identifier mapping
402
-        if (! $this->identifier) {
402
+        if ( ! $this->identifier) {
403 403
             throw MappingException::identifierRequired($this->className);
404 404
         }
405 405
 
406
-        $explicitlyGeneratedProperties = array_filter($this->declaredProperties, function (Property $property) : bool {
406
+        $explicitlyGeneratedProperties = array_filter($this->declaredProperties, function(Property $property) : bool {
407 407
             return $property instanceof FieldMetadata
408 408
                 && $property->isPrimaryKey()
409 409
                 && $property->hasValueGenerator();
@@ -422,14 +422,14 @@  discard block
 block discarded – undo
422 422
     public function validateAssociations() : void
423 423
     {
424 424
         array_map(
425
-            function (Property $property) {
426
-                if (! ($property instanceof AssociationMetadata)) {
425
+            function(Property $property) {
426
+                if ( ! ($property instanceof AssociationMetadata)) {
427 427
                     return;
428 428
                 }
429 429
 
430 430
                 $targetEntity = $property->getTargetEntity();
431 431
 
432
-                if (! class_exists($targetEntity)) {
432
+                if ( ! class_exists($targetEntity)) {
433 433
                     throw MappingException::invalidTargetEntityClass($targetEntity, $this->className, $property->getName());
434 434
                 }
435 435
             },
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
         foreach ($this->lifecycleCallbacks as $callbacks) {
448 448
             /** @var array $callbacks */
449 449
             foreach ($callbacks as $callbackFuncName) {
450
-                if (! $reflectionService->hasPublicMethod($this->className, $callbackFuncName)) {
450
+                if ( ! $reflectionService->hasPublicMethod($this->className, $callbackFuncName)) {
451 451
                     throw MappingException::lifecycleCallbackMethodNotFound($this->className, $callbackFuncName);
452 452
                 }
453 453
             }
@@ -471,11 +471,11 @@  discard block
 block discarded – undo
471 471
      */
472 472
     public function isIdentifier(string $fieldName) : bool
473 473
     {
474
-        if (! $this->identifier) {
474
+        if ( ! $this->identifier) {
475 475
             return false;
476 476
         }
477 477
 
478
-        if (! $this->isIdentifierComposite()) {
478
+        if ( ! $this->isIdentifierComposite()) {
479 479
             return $fieldName === $this->identifier[0];
480 480
         }
481 481
 
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
      */
501 501
     public function getNamedNativeQuery($queryName) : array
502 502
     {
503
-        if (! isset($this->namedNativeQueries[$queryName])) {
503
+        if ( ! isset($this->namedNativeQueries[$queryName])) {
504 504
             throw MappingException::queryNotFound($this->className, $queryName);
505 505
         }
506 506
 
@@ -530,7 +530,7 @@  discard block
 block discarded – undo
530 530
      */
531 531
     public function getSqlResultSetMapping($name)
532 532
     {
533
-        if (! isset($this->sqlResultSetMappings[$name])) {
533
+        if ( ! isset($this->sqlResultSetMappings[$name])) {
534 534
             throw MappingException::resultMappingNotFound($this->className, $name);
535 535
         }
536 536
 
@@ -563,7 +563,7 @@  discard block
 block discarded – undo
563 563
             $property->setColumnName($columnName);
564 564
         }
565 565
 
566
-        if (! $this->isMappedSuperclass) {
566
+        if ( ! $this->isMappedSuperclass) {
567 567
             $property->setTableName($this->getTableName());
568 568
         }
569 569
 
@@ -583,7 +583,7 @@  discard block
 block discarded – undo
583 583
                 throw MappingException::sqlConversionNotAllowedForPrimaryKeyProperties($this->className, $property);
584 584
             }
585 585
 
586
-            if (! in_array($fieldName, $this->identifier, true)) {
586
+            if ( ! in_array($fieldName, $this->identifier, true)) {
587 587
                 $this->identifier[] = $fieldName;
588 588
             }
589 589
         }
@@ -633,7 +633,7 @@  discard block
 block discarded – undo
633 633
         $fieldName    = $property->getName();
634 634
         $targetEntity = $property->getTargetEntity();
635 635
 
636
-        if (! $targetEntity) {
636
+        if ( ! $targetEntity) {
637 637
             throw MappingException::missingTargetEntity($fieldName);
638 638
         }
639 639
 
@@ -647,7 +647,7 @@  discard block
 block discarded – undo
647 647
                 throw MappingException::illegalOrphanRemovalOnIdentifierAssociation($this->className, $fieldName);
648 648
             }
649 649
 
650
-            if (! in_array($property->getName(), $this->identifier, true)) {
650
+            if ( ! in_array($property->getName(), $this->identifier, true)) {
651 651
                 if ($property instanceof ToOneAssociationMetadata && count($property->getJoinColumns()) >= 2) {
652 652
                     throw MappingException::cannotMapCompositePrimaryKeyEntitiesAsForeignId(
653 653
                         $property->getTargetEntity(),
@@ -713,7 +713,7 @@  discard block
 block discarded – undo
713 713
                 /** @var JoinColumnMetadata $joinColumn */
714 714
                 if ($property instanceof OneToOneAssociationMetadata && $this->inheritanceType !== InheritanceType::SINGLE_TABLE) {
715 715
                     if (count($property->getJoinColumns()) === 1) {
716
-                        if (! $property->isPrimaryKey()) {
716
+                        if ( ! $property->isPrimaryKey()) {
717 717
                             $joinColumn->setUnique(true);
718 718
                         }
719 719
                     } else {
@@ -721,13 +721,13 @@  discard block
 block discarded – undo
721 721
                     }
722 722
                 }
723 723
 
724
-                $joinColumn->setTableName(! $this->isMappedSuperclass ? $this->getTableName() : null);
724
+                $joinColumn->setTableName( ! $this->isMappedSuperclass ? $this->getTableName() : null);
725 725
 
726
-                if (! $joinColumn->getColumnName()) {
726
+                if ( ! $joinColumn->getColumnName()) {
727 727
                     $joinColumn->setColumnName($this->namingStrategy->joinColumnName($fieldName, $this->className));
728 728
                 }
729 729
 
730
-                if (! $joinColumn->getReferencedColumnName()) {
730
+                if ( ! $joinColumn->getReferencedColumnName()) {
731 731
                     $joinColumn->setReferencedColumnName($this->namingStrategy->referenceColumnName());
732 732
                 }
733 733
 
@@ -735,7 +735,7 @@  discard block
 block discarded – undo
735 735
             }
736 736
 
737 737
             if ($uniqueConstraintColumns) {
738
-                if (! $this->table) {
738
+                if ( ! $this->table) {
739 739
                     throw new \RuntimeException(
740 740
                         'ClassMetadata::setTable() has to be called before defining a one to one relationship.'
741 741
                     );
@@ -755,7 +755,7 @@  discard block
 block discarded – undo
755 755
         if ($property->isOrphanRemoval()) {
756 756
             $cascades = $property->getCascade();
757 757
 
758
-            if (! in_array('remove', $cascades, true)) {
758
+            if ( ! in_array('remove', $cascades, true)) {
759 759
                 $cascades[] = 'remove';
760 760
 
761 761
                 $property->setCascade($cascades);
@@ -821,14 +821,14 @@  discard block
 block discarded – undo
821 821
         $property->setOwningSide(false);
822 822
 
823 823
         // OneToMany MUST have mappedBy
824
-        if (! $property->getMappedBy()) {
824
+        if ( ! $property->getMappedBy()) {
825 825
             throw MappingException::oneToManyRequiresMappedBy($property->getName());
826 826
         }
827 827
 
828 828
         if ($property->isOrphanRemoval()) {
829 829
             $cascades = $property->getCascade();
830 830
 
831
-            if (! in_array('remove', $cascades, true)) {
831
+            if ( ! in_array('remove', $cascades, true)) {
832 832
                 $cascades[] = 'remove';
833 833
 
834 834
                 $property->setCascade($cascades);
@@ -851,7 +851,7 @@  discard block
 block discarded – undo
851 851
 
852 852
             $property->setJoinTable($joinTable);
853 853
 
854
-            if (! $joinTable->getName()) {
854
+            if ( ! $joinTable->getName()) {
855 855
                 $joinTableName = $this->namingStrategy->joinTableName(
856 856
                     $property->getSourceEntity(),
857 857
                     $property->getTargetEntity(),
@@ -863,7 +863,7 @@  discard block
 block discarded – undo
863 863
 
864 864
             $selfReferencingEntityWithoutJoinColumns = $property->getSourceEntity() === $property->getTargetEntity() && ! $joinTable->hasColumns();
865 865
 
866
-            if (! $joinTable->getJoinColumns()) {
866
+            if ( ! $joinTable->getJoinColumns()) {
867 867
                 $referencedColumnName = $this->namingStrategy->referenceColumnName();
868 868
                 $sourceReferenceName  = $selfReferencingEntityWithoutJoinColumns ? 'source' : $referencedColumnName;
869 869
                 $columnName           = $this->namingStrategy->joinKeyColumnName($property->getSourceEntity(), $sourceReferenceName);
@@ -876,7 +876,7 @@  discard block
 block discarded – undo
876 876
                 $joinTable->addJoinColumn($joinColumn);
877 877
             }
878 878
 
879
-            if (! $joinTable->getInverseJoinColumns()) {
879
+            if ( ! $joinTable->getInverseJoinColumns()) {
880 880
                 $referencedColumnName = $this->namingStrategy->referenceColumnName();
881 881
                 $targetReferenceName  = $selfReferencingEntityWithoutJoinColumns ? 'target' : $referencedColumnName;
882 882
                 $columnName           = $this->namingStrategy->joinKeyColumnName($property->getTargetEntity(), $targetReferenceName);
@@ -891,13 +891,13 @@  discard block
 block discarded – undo
891 891
 
892 892
             foreach ($joinTable->getJoinColumns() as $joinColumn) {
893 893
                 /** @var JoinColumnMetadata $joinColumn */
894
-                if (! $joinColumn->getReferencedColumnName()) {
894
+                if ( ! $joinColumn->getReferencedColumnName()) {
895 895
                     $joinColumn->setReferencedColumnName($this->namingStrategy->referenceColumnName());
896 896
                 }
897 897
 
898 898
                 $referencedColumnName = $joinColumn->getReferencedColumnName();
899 899
 
900
-                if (! $joinColumn->getColumnName()) {
900
+                if ( ! $joinColumn->getColumnName()) {
901 901
                     $columnName = $this->namingStrategy->joinKeyColumnName(
902 902
                         $property->getSourceEntity(),
903 903
                         $referencedColumnName
@@ -909,13 +909,13 @@  discard block
 block discarded – undo
909 909
 
910 910
             foreach ($joinTable->getInverseJoinColumns() as $inverseJoinColumn) {
911 911
                 /** @var JoinColumnMetadata $inverseJoinColumn */
912
-                if (! $inverseJoinColumn->getReferencedColumnName()) {
912
+                if ( ! $inverseJoinColumn->getReferencedColumnName()) {
913 913
                     $inverseJoinColumn->setReferencedColumnName($this->namingStrategy->referenceColumnName());
914 914
                 }
915 915
 
916 916
                 $referencedColumnName = $inverseJoinColumn->getReferencedColumnName();
917 917
 
918
-                if (! $inverseJoinColumn->getColumnName()) {
918
+                if ( ! $inverseJoinColumn->getColumnName()) {
919 919
                     $columnName = $this->namingStrategy->joinKeyColumnName(
920 920
                         $property->getTargetEntity(),
921 921
                         $referencedColumnName
@@ -949,7 +949,7 @@  discard block
 block discarded – undo
949 949
             throw MappingException::singleIdNotAllowedOnCompositePrimaryKey($this->className);
950 950
         }
951 951
 
952
-        if (! isset($this->identifier[0])) {
952
+        if ( ! isset($this->identifier[0])) {
953 953
             throw MappingException::noIdDefined($this->className);
954 954
         }
955 955
 
@@ -1008,7 +1008,7 @@  discard block
 block discarded – undo
1008 1008
             // Association defined as Id field
1009 1009
             $targetClass = $em->getClassMetadata($property->getTargetEntity());
1010 1010
 
1011
-            if (! $property->isOwningSide()) {
1011
+            if ( ! $property->isOwningSide()) {
1012 1012
                 $property    = $targetClass->getProperty($property->getMappedBy());
1013 1013
                 $targetClass = $em->getClassMetadata($property->getTargetEntity());
1014 1014
             }
@@ -1023,7 +1023,7 @@  discard block
 block discarded – undo
1023 1023
                 $columnName           = $joinColumn->getColumnName();
1024 1024
                 $referencedColumnName = $joinColumn->getReferencedColumnName();
1025 1025
 
1026
-                if (! $joinColumn->getType()) {
1026
+                if ( ! $joinColumn->getType()) {
1027 1027
                     $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $em));
1028 1028
                 }
1029 1029
 
@@ -1057,11 +1057,11 @@  discard block
 block discarded – undo
1057 1057
     {
1058 1058
         $schema = $this->getSchemaName() === null
1059 1059
             ? ''
1060
-            : $this->getSchemaName() . '_'
1060
+            : $this->getSchemaName().'_'
1061 1061
         ;
1062 1062
 
1063 1063
         // replace dots with underscores because PostgreSQL creates temporary tables in a special schema
1064
-        return $schema . $this->getTableName() . '_id_tmp';
1064
+        return $schema.$this->getTableName().'_id_tmp';
1065 1065
     }
1066 1066
 
1067 1067
     /**
@@ -1095,7 +1095,7 @@  discard block
 block discarded – undo
1095 1095
      */
1096 1096
     public function setInheritanceType($type) : void
1097 1097
     {
1098
-        if (! $this->isInheritanceType($type)) {
1098
+        if ( ! $this->isInheritanceType($type)) {
1099 1099
             throw MappingException::invalidInheritanceType($this->className, $type);
1100 1100
         }
1101 1101
 
@@ -1113,7 +1113,7 @@  discard block
 block discarded – undo
1113 1113
     {
1114 1114
         $fieldName = $property->getName();
1115 1115
 
1116
-        if (! isset($this->declaredProperties[$fieldName])) {
1116
+        if ( ! isset($this->declaredProperties[$fieldName])) {
1117 1117
             throw MappingException::invalidOverrideFieldName($this->className, $fieldName);
1118 1118
         }
1119 1119
 
@@ -1310,7 +1310,7 @@  discard block
 block discarded – undo
1310 1310
         $declaringClass    = $property->getDeclaringClass();
1311 1311
 
1312 1312
         if ($inheritedProperty instanceof FieldMetadata) {
1313
-            if (! $declaringClass->isMappedSuperclass) {
1313
+            if ( ! $declaringClass->isMappedSuperclass) {
1314 1314
                 $inheritedProperty->setTableName($property->getTableName());
1315 1315
             }
1316 1316
 
@@ -1354,7 +1354,7 @@  discard block
 block discarded – undo
1354 1354
             throw MappingException::duplicateQueryMapping($this->className, $name);
1355 1355
         }
1356 1356
 
1357
-        if (! isset($queryMapping['resultClass']) && ! isset($queryMapping['resultSetMapping'])) {
1357
+        if ( ! isset($queryMapping['resultClass']) && ! isset($queryMapping['resultSetMapping'])) {
1358 1358
             throw MappingException::missingQueryMapping($this->className, $name);
1359 1359
         }
1360 1360
 
@@ -1371,7 +1371,7 @@  discard block
 block discarded – undo
1371 1371
      */
1372 1372
     public function addSqlResultSetMapping(array $resultMapping)
1373 1373
     {
1374
-        if (! isset($resultMapping['name'])) {
1374
+        if ( ! isset($resultMapping['name'])) {
1375 1375
             throw MappingException::nameIsMandatoryForSqlResultSetMapping($this->className);
1376 1376
         }
1377 1377
 
@@ -1381,7 +1381,7 @@  discard block
 block discarded – undo
1381 1381
 
1382 1382
         if (isset($resultMapping['entities'])) {
1383 1383
             foreach ($resultMapping['entities'] as $key => $entityResult) {
1384
-                if (! isset($entityResult['entityClass'])) {
1384
+                if ( ! isset($entityResult['entityClass'])) {
1385 1385
                     throw MappingException::missingResultSetMappingEntity($this->className, $resultMapping['name']);
1386 1386
                 }
1387 1387
 
@@ -1390,11 +1390,11 @@  discard block
 block discarded – undo
1390 1390
 
1391 1391
                 if (isset($entityResult['fields'])) {
1392 1392
                     foreach ($entityResult['fields'] as $k => $field) {
1393
-                        if (! isset($field['name'])) {
1393
+                        if ( ! isset($field['name'])) {
1394 1394
                             throw MappingException::missingResultSetMappingFieldName($this->className, $resultMapping['name']);
1395 1395
                         }
1396 1396
 
1397
-                        if (! isset($field['column'])) {
1397
+                        if ( ! isset($field['column'])) {
1398 1398
                             $fieldName = $field['name'];
1399 1399
 
1400 1400
                             if (strpos($fieldName, '.')) {
@@ -1492,11 +1492,11 @@  discard block
 block discarded – undo
1492 1492
             'method' => $method,
1493 1493
         ];
1494 1494
 
1495
-        if (! class_exists($class)) {
1495
+        if ( ! class_exists($class)) {
1496 1496
             throw MappingException::entityListenerClassNotFound($class, $this->className);
1497 1497
         }
1498 1498
 
1499
-        if (! method_exists($class, $method)) {
1499
+        if ( ! method_exists($class, $method)) {
1500 1500
             throw MappingException::entityListenerMethodNotFound($class, $method, $this->className);
1501 1501
         }
1502 1502
 
@@ -1563,7 +1563,7 @@  discard block
 block discarded – undo
1563 1563
             return;
1564 1564
         }
1565 1565
 
1566
-        if (! (class_exists($className) || interface_exists($className))) {
1566
+        if ( ! (class_exists($className) || interface_exists($className))) {
1567 1567
             throw MappingException::invalidClassInDiscriminatorMap($className, $this->className);
1568 1568
         }
1569 1569
 
Please login to merge, or discard this patch.