Failed Conditions
Pull Request — develop (#6684)
by Michael
61:07
created
tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,6 @@
 block discarded – undo
30 30
 use Doctrine\Tests\Models\ValueGenerators\DummyWithThreeProperties;
31 31
 use Doctrine\Tests\OrmTestCase;
32 32
 use DoctrineGlobal_Article;
33
-use SebastianBergmann\Environment\Runtime;
34 33
 
35 34
 require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php';
36 35
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/ClassMetadata.php 1 patch
Spacing   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 
4
-declare(strict_types=1);
4
+declare(strict_types = 1);
5 5
 
6 6
 namespace Doctrine\ORM\Mapping;
7 7
 
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
      */
309 309
     public function __toString()
310 310
     {
311
-        return __CLASS__ . '@' . spl_object_hash($this);
311
+        return __CLASS__.'@'.spl_object_hash($this);
312 312
     }
313 313
 
314 314
     /**
@@ -411,7 +411,7 @@  discard block
 block discarded – undo
411 411
         // Restore ReflectionClass and properties
412 412
         $this->reflectionClass = $reflectionService->getClass($this->className);
413 413
 
414
-        if (! $this->reflectionClass) {
414
+        if ( ! $this->reflectionClass) {
415 415
             return;
416 416
         }
417 417
 
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
         }
438 438
 
439 439
         // Verify & complete identifier mapping
440
-        if (! $this->identifier) {
440
+        if ( ! $this->identifier) {
441 441
             throw MappingException::identifierRequired($this->className);
442 442
         }
443 443
     }
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
     public function validateValueGenerators() : void
449 449
     {
450 450
         foreach ($this->getPropertiesIterator() as $property) {
451
-            if (! $property instanceof FieldMetadata || ! $property->hasValueGenerator()) {
451
+            if ( ! $property instanceof FieldMetadata || ! $property->hasValueGenerator()) {
452 452
                 continue;
453 453
             }
454 454
 
@@ -458,7 +458,7 @@  discard block
 block discarded – undo
458 458
                 continue;
459 459
             }
460 460
 
461
-            if (! $property->isPrimaryKey()) {
461
+            if ( ! $property->isPrimaryKey()) {
462 462
                 throw MappingException::nonPrimaryidentityGeneratorNotSupported($this->className);
463 463
             }
464 464
 
@@ -478,14 +478,14 @@  discard block
 block discarded – undo
478 478
     public function validateAssociations() : void
479 479
     {
480 480
         array_map(
481
-            function (Property $property) {
482
-                if (! ($property instanceof AssociationMetadata)) {
481
+            function(Property $property) {
482
+                if ( ! ($property instanceof AssociationMetadata)) {
483 483
                     return;
484 484
                 }
485 485
 
486 486
                 $targetEntity = $property->getTargetEntity();
487 487
 
488
-                if (! class_exists($targetEntity)) {
488
+                if ( ! class_exists($targetEntity)) {
489 489
                     throw MappingException::invalidTargetEntityClass($targetEntity, $this->className, $property->getName());
490 490
                 }
491 491
             },
@@ -507,7 +507,7 @@  discard block
 block discarded – undo
507 507
         foreach ($this->lifecycleCallbacks as $callbacks) {
508 508
             /** @var array $callbacks */
509 509
             foreach ($callbacks as $callbackFuncName) {
510
-                if (! $reflectionService->hasPublicMethod($this->className, $callbackFuncName)) {
510
+                if ( ! $reflectionService->hasPublicMethod($this->className, $callbackFuncName)) {
511 511
                     throw MappingException::lifecycleCallbackMethodNotFound($this->className, $callbackFuncName);
512 512
                 }
513 513
             }
@@ -535,11 +535,11 @@  discard block
 block discarded – undo
535 535
      */
536 536
     public function isIdentifier(string $fieldName) : bool
537 537
     {
538
-        if (! $this->identifier) {
538
+        if ( ! $this->identifier) {
539 539
             return false;
540 540
         }
541 541
 
542
-        if (! $this->isIdentifierComposite()) {
542
+        if ( ! $this->isIdentifierComposite()) {
543 543
             return $fieldName === $this->identifier[0];
544 544
         }
545 545
 
@@ -567,7 +567,7 @@  discard block
 block discarded – undo
567 567
      */
568 568
     public function getNamedQuery($queryName) : string
569 569
     {
570
-        if (! isset($this->namedQueries[$queryName])) {
570
+        if ( ! isset($this->namedQueries[$queryName])) {
571 571
             throw MappingException::queryNotFound($this->className, $queryName);
572 572
         }
573 573
 
@@ -627,7 +627,7 @@  discard block
 block discarded – undo
627 627
      */
628 628
     public function getSqlResultSetMapping($name)
629 629
     {
630
-        if (! isset($this->sqlResultSetMappings[$name])) {
630
+        if ( ! isset($this->sqlResultSetMappings[$name])) {
631 631
             throw MappingException::resultMappingNotFound($this->className, $name);
632 632
         }
633 633
 
@@ -662,7 +662,7 @@  discard block
 block discarded – undo
662 662
             $property->setColumnName($columnName);
663 663
         }
664 664
 
665
-        if (! $this->isMappedSuperclass) {
665
+        if ( ! $this->isMappedSuperclass) {
666 666
             $property->setTableName($this->getTableName());
667 667
         }
668 668
 
@@ -682,7 +682,7 @@  discard block
 block discarded – undo
682 682
                 throw MappingException::sqlConversionNotAllowedForPrimaryKeyProperties($property);
683 683
             };
684 684
 
685
-            if (! in_array($fieldName, $this->identifier)) {
685
+            if ( ! in_array($fieldName, $this->identifier)) {
686 686
                 $this->identifier[] = $fieldName;
687 687
             }
688 688
         }
@@ -736,7 +736,7 @@  discard block
 block discarded – undo
736 736
         $fieldName    = $property->getName();
737 737
         $targetEntity = $property->getTargetEntity();
738 738
 
739
-        if (! $targetEntity) {
739
+        if ( ! $targetEntity) {
740 740
             throw MappingException::missingTargetEntity($fieldName);
741 741
         }
742 742
 
@@ -762,7 +762,7 @@  discard block
 block discarded – undo
762 762
                 $this->identifier[] = $property->getName();
763 763
             }
764 764
 
765
-            if ($this->cache && !$property->getCache()) {
765
+            if ($this->cache && ! $property->getCache()) {
766 766
                 throw CacheException::nonCacheableEntityAssociation($this->className, $fieldName);
767 767
             }
768 768
 
@@ -816,7 +816,7 @@  discard block
 block discarded – undo
816 816
                 /** @var JoinColumnMetadata $joinColumn */
817 817
                 if ($property instanceof OneToOneAssociationMetadata && $this->inheritanceType !== InheritanceType::SINGLE_TABLE) {
818 818
                     if (1 === count($property->getJoinColumns())) {
819
-                        if (! $property->isPrimaryKey()) {
819
+                        if ( ! $property->isPrimaryKey()) {
820 820
                             $joinColumn->setUnique(true);
821 821
                         }
822 822
                     } else {
@@ -824,13 +824,13 @@  discard block
 block discarded – undo
824 824
                     }
825 825
                 }
826 826
 
827
-                $joinColumn->setTableName(! $this->isMappedSuperclass ? $this->getTableName() : null);
827
+                $joinColumn->setTableName( ! $this->isMappedSuperclass ? $this->getTableName() : null);
828 828
 
829
-                if (! $joinColumn->getColumnName()) {
829
+                if ( ! $joinColumn->getColumnName()) {
830 830
                     $joinColumn->setColumnName($this->namingStrategy->joinColumnName($fieldName, $this->className));
831 831
                 }
832 832
 
833
-                if (! $joinColumn->getReferencedColumnName()) {
833
+                if ( ! $joinColumn->getReferencedColumnName()) {
834 834
                     $joinColumn->setReferencedColumnName($this->namingStrategy->referenceColumnName());
835 835
                 }
836 836
 
@@ -858,7 +858,7 @@  discard block
 block discarded – undo
858 858
         if ($property->isOrphanRemoval()) {
859 859
             $cascades = $property->getCascade();
860 860
 
861
-            if (! in_array('remove', $cascades)) {
861
+            if ( ! in_array('remove', $cascades)) {
862 862
                 $cascades[] = 'remove';
863 863
 
864 864
                 $property->setCascade($cascades);
@@ -924,14 +924,14 @@  discard block
 block discarded – undo
924 924
         $property->setOwningSide(false);
925 925
 
926 926
         // OneToMany MUST have mappedBy
927
-        if (! $property->getMappedBy()) {
927
+        if ( ! $property->getMappedBy()) {
928 928
             throw MappingException::oneToManyRequiresMappedBy($property->getName());
929 929
         }
930 930
 
931 931
         if ($property->isOrphanRemoval()) {
932 932
             $cascades = $property->getCascade();
933 933
 
934
-            if (! in_array('remove', $cascades)) {
934
+            if ( ! in_array('remove', $cascades)) {
935 935
                 $cascades[] = 'remove';
936 936
 
937 937
                 $property->setCascade($cascades);
@@ -954,7 +954,7 @@  discard block
 block discarded – undo
954 954
 
955 955
             $property->setJoinTable($joinTable);
956 956
 
957
-            if (! $joinTable->getName()) {
957
+            if ( ! $joinTable->getName()) {
958 958
                 $joinTableName = $this->namingStrategy->joinTableName(
959 959
                     $property->getSourceEntity(),
960 960
                     $property->getTargetEntity(),
@@ -966,7 +966,7 @@  discard block
 block discarded – undo
966 966
 
967 967
             $selfReferencingEntityWithoutJoinColumns = $property->getSourceEntity() == $property->getTargetEntity() && ! $joinTable->hasColumns();
968 968
 
969
-            if (! $joinTable->getJoinColumns()) {
969
+            if ( ! $joinTable->getJoinColumns()) {
970 970
                 $referencedColumnName = $this->namingStrategy->referenceColumnName();
971 971
                 $sourceReferenceName  = $selfReferencingEntityWithoutJoinColumns ? 'source' : $referencedColumnName;
972 972
                 $columnName           = $this->namingStrategy->joinKeyColumnName($property->getSourceEntity(), $sourceReferenceName);
@@ -979,7 +979,7 @@  discard block
 block discarded – undo
979 979
                 $joinTable->addJoinColumn($joinColumn);
980 980
             }
981 981
 
982
-            if (! $joinTable->getInverseJoinColumns()) {
982
+            if ( ! $joinTable->getInverseJoinColumns()) {
983 983
                 $referencedColumnName = $this->namingStrategy->referenceColumnName();
984 984
                 $targetReferenceName  = $selfReferencingEntityWithoutJoinColumns ? 'target' : $referencedColumnName;
985 985
                 $columnName           = $this->namingStrategy->joinKeyColumnName($property->getTargetEntity(), $targetReferenceName);
@@ -994,13 +994,13 @@  discard block
 block discarded – undo
994 994
 
995 995
             foreach ($joinTable->getJoinColumns() as $joinColumn) {
996 996
                 /** @var JoinColumnMetadata $joinColumn */
997
-                if (! $joinColumn->getReferencedColumnName()) {
997
+                if ( ! $joinColumn->getReferencedColumnName()) {
998 998
                     $joinColumn->setReferencedColumnName($this->namingStrategy->referenceColumnName());
999 999
                 }
1000 1000
 
1001 1001
                 $referencedColumnName = $joinColumn->getReferencedColumnName();
1002 1002
 
1003
-                if (! $joinColumn->getColumnName()) {
1003
+                if ( ! $joinColumn->getColumnName()) {
1004 1004
                     $columnName = $this->namingStrategy->joinKeyColumnName(
1005 1005
                         $property->getSourceEntity(),
1006 1006
                         $referencedColumnName
@@ -1012,13 +1012,13 @@  discard block
 block discarded – undo
1012 1012
 
1013 1013
             foreach ($joinTable->getInverseJoinColumns() as $inverseJoinColumn) {
1014 1014
                 /** @var JoinColumnMetadata $inverseJoinColumn */
1015
-                if (! $inverseJoinColumn->getReferencedColumnName()) {
1015
+                if ( ! $inverseJoinColumn->getReferencedColumnName()) {
1016 1016
                     $inverseJoinColumn->setReferencedColumnName($this->namingStrategy->referenceColumnName());
1017 1017
                 }
1018 1018
 
1019 1019
                 $referencedColumnName = $inverseJoinColumn->getReferencedColumnName();
1020 1020
 
1021
-                if (! $inverseJoinColumn->getColumnName()) {
1021
+                if ( ! $inverseJoinColumn->getColumnName()) {
1022 1022
                     $columnName = $this->namingStrategy->joinKeyColumnName(
1023 1023
                         $property->getTargetEntity(),
1024 1024
                         $referencedColumnName
@@ -1115,7 +1115,7 @@  discard block
 block discarded – undo
1115 1115
             // Association defined as Id field
1116 1116
             $targetClass = $em->getClassMetadata($property->getTargetEntity());
1117 1117
 
1118
-            if (! $property->isOwningSide()) {
1118
+            if ( ! $property->isOwningSide()) {
1119 1119
                 $property    = $targetClass->getProperty($property->getMappedBy());
1120 1120
                 $targetClass = $em->getClassMetadata($property->getTargetEntity());
1121 1121
             }
@@ -1130,7 +1130,7 @@  discard block
 block discarded – undo
1130 1130
                 $columnName           = $joinColumn->getColumnName();
1131 1131
                 $referencedColumnName = $joinColumn->getReferencedColumnName();
1132 1132
 
1133
-                if (! $joinColumn->getType()) {
1133
+                if ( ! $joinColumn->getType()) {
1134 1134
                     $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $em));
1135 1135
                 }
1136 1136
 
@@ -1170,11 +1170,11 @@  discard block
 block discarded – undo
1170 1170
     {
1171 1171
         $schema = null === $this->getSchemaName()
1172 1172
             ? ''
1173
-            : $this->getSchemaName() . '_'
1173
+            : $this->getSchemaName().'_'
1174 1174
         ;
1175 1175
 
1176 1176
         // replace dots with underscores because PostgreSQL creates temporary tables in a special schema
1177
-        return $schema . $this->getTableName() . '_id_tmp';
1177
+        return $schema.$this->getTableName().'_id_tmp';
1178 1178
     }
1179 1179
 
1180 1180
     /**
@@ -1234,7 +1234,7 @@  discard block
 block discarded – undo
1234 1234
     {
1235 1235
         $fieldName = $property->getName();
1236 1236
 
1237
-        if (! isset($this->declaredProperties[$fieldName])) {
1237
+        if ( ! isset($this->declaredProperties[$fieldName])) {
1238 1238
             throw MappingException::invalidOverrideFieldName($this->className, $fieldName);
1239 1239
         }
1240 1240
 
@@ -1442,7 +1442,7 @@  discard block
 block discarded – undo
1442 1442
         $declaringClass    = $property->getDeclaringClass();
1443 1443
 
1444 1444
         if ($inheritedProperty instanceof FieldMetadata) {
1445
-            if (! $declaringClass->isMappedSuperclass) {
1445
+            if ( ! $declaringClass->isMappedSuperclass) {
1446 1446
                 $inheritedProperty->setTableName($property->getTableName());
1447 1447
             }
1448 1448
 
@@ -1510,7 +1510,7 @@  discard block
 block discarded – undo
1510 1510
             throw MappingException::duplicateQueryMapping($this->className, $name);
1511 1511
         }
1512 1512
 
1513
-        if (! isset($queryMapping['resultClass']) && ! isset($queryMapping['resultSetMapping'])) {
1513
+        if ( ! isset($queryMapping['resultClass']) && ! isset($queryMapping['resultSetMapping'])) {
1514 1514
             throw MappingException::missingQueryMapping($this->className, $name);
1515 1515
         }
1516 1516
 
@@ -1533,7 +1533,7 @@  discard block
 block discarded – undo
1533 1533
      */
1534 1534
     public function addSqlResultSetMapping(array $resultMapping)
1535 1535
     {
1536
-        if (!isset($resultMapping['name'])) {
1536
+        if ( ! isset($resultMapping['name'])) {
1537 1537
             throw MappingException::nameIsMandatoryForSqlResultSetMapping($this->className);
1538 1538
         }
1539 1539
 
@@ -1543,7 +1543,7 @@  discard block
 block discarded – undo
1543 1543
 
1544 1544
         if (isset($resultMapping['entities'])) {
1545 1545
             foreach ($resultMapping['entities'] as $key => $entityResult) {
1546
-                if (! isset($entityResult['entityClass'])) {
1546
+                if ( ! isset($entityResult['entityClass'])) {
1547 1547
                     throw MappingException::missingResultSetMappingEntity($this->className, $resultMapping['name']);
1548 1548
                 }
1549 1549
 
@@ -1556,11 +1556,11 @@  discard block
 block discarded – undo
1556 1556
 
1557 1557
                 if (isset($entityResult['fields'])) {
1558 1558
                     foreach ($entityResult['fields'] as $k => $field) {
1559
-                        if (! isset($field['name'])) {
1559
+                        if ( ! isset($field['name'])) {
1560 1560
                             throw MappingException::missingResultSetMappingFieldName($this->className, $resultMapping['name']);
1561 1561
                         }
1562 1562
 
1563
-                        if (! isset($field['column'])) {
1563
+                        if ( ! isset($field['column'])) {
1564 1564
                             $fieldName = $field['name'];
1565 1565
 
1566 1566
                             if (strpos($fieldName, '.')) {
@@ -1669,11 +1669,11 @@  discard block
 block discarded – undo
1669 1669
             'method' => $method,
1670 1670
         ];
1671 1671
 
1672
-        if (! class_exists($class)) {
1672
+        if ( ! class_exists($class)) {
1673 1673
             throw MappingException::entityListenerClassNotFound($class, $this->className);
1674 1674
         }
1675 1675
 
1676
-        if (! method_exists($class, $method)) {
1676
+        if ( ! method_exists($class, $method)) {
1677 1677
             throw MappingException::entityListenerMethodNotFound($class, $method, $this->className);
1678 1678
         }
1679 1679
 
@@ -1749,7 +1749,7 @@  discard block
 block discarded – undo
1749 1749
             return;
1750 1750
         }
1751 1751
 
1752
-        if (! (class_exists($className) || interface_exists($className))) {
1752
+        if ( ! (class_exists($className) || interface_exists($className))) {
1753 1753
             throw MappingException::invalidClassInDiscriminatorMap($className, $this->className);
1754 1754
         }
1755 1755
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/MappingException.php 1 patch
Spacing   +25 added lines, -25 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
 
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
         $message = "The mapping of field '{$field}' is invalid: The option '{$expectedOption}' is required.";
275 275
 
276 276
         if ( ! empty($hint)) {
277
-            $message .= ' (Hint: ' . $hint . ')';
277
+            $message .= ' (Hint: '.$hint.')';
278 278
         }
279 279
 
280 280
         return new self($message);
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
      */
305 305
     public static function reflectionFailure($entity, \ReflectionException $previousException)
306 306
     {
307
-        return new self('An error occurred in ' . $entity, 0, $previousException);
307
+        return new self('An error occurred in '.$entity, 0, $previousException);
308 308
     }
309 309
 
310 310
     /**
@@ -315,8 +315,8 @@  discard block
 block discarded – undo
315 315
      */
316 316
     public static function joinColumnMustPointToMappedField($className, $joinColumn)
317 317
     {
318
-        return new self('The column ' . $joinColumn . ' must be mapped to a field in class '
319
-            . $className . ' since it is referenced by a join column of another class.');
318
+        return new self('The column '.$joinColumn.' must be mapped to a field in class '
319
+            . $className.' since it is referenced by a join column of another class.');
320 320
     }
321 321
 
322 322
     /**
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
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
     /**
@@ -436,12 +436,12 @@  discard block
 block discarded – undo
436 436
     public static function fileMappingDriversRequireConfiguredDirectoryPath($path = null)
437 437
     {
438 438
         if ( ! empty($path)) {
439
-            $path = '[' . $path . ']';
439
+            $path = '['.$path.']';
440 440
         }
441 441
 
442 442
         return new self(
443
-            'File mapping drivers must have a valid directory path, ' .
444
-            'however the given path ' . $path . ' seems to be incorrect!'
443
+            'File mapping drivers must have a valid directory path, '.
444
+            'however the given path '.$path.' seems to be incorrect!'
445 445
         );
446 446
     }
447 447
 
@@ -472,11 +472,11 @@  discard block
 block discarded – undo
472 472
     public static function duplicateDiscriminatorEntry($className, array $entries, array $map)
473 473
     {
474 474
         return new self(
475
-            "The entries " . implode(', ', $entries) . " in discriminator map of class '" . $className . "' is duplicated. " .
476
-            "If the discriminator map is automatically generated you have to convert it to an explicit discriminator map now. " .
477
-            "The entries of the current map are: @DiscriminatorMap({" . implode(', ', array_map(
475
+            "The entries ".implode(', ', $entries)." in discriminator map of class '".$className."' is duplicated. ".
476
+            "If the discriminator map is automatically generated you have to convert it to an explicit discriminator map now. ".
477
+            "The entries of the current map are: @DiscriminatorMap({".implode(', ', array_map(
478 478
                 function($a, $b) { return "'$a': '$b'"; }, array_keys($map), array_values($map)
479
-            )) . "})"
479
+            ))."})"
480 480
         );
481 481
     }
482 482
 
@@ -540,7 +540,7 @@  discard block
 block discarded – undo
540 540
     public static function sqlConversionNotAllowedForPrimaryKeyProperties($className, Property $property)
541 541
     {
542 542
         return new self(sprintf(
543
-            'It is not possible to set id field "%s" to type "%s" in entity class "%s". ' .
543
+            'It is not possible to set id field "%s" to type "%s" in entity class "%s". '.
544 544
             'The type "%s" requires conversion SQL which is not allowed for identifiers.',
545 545
             $property->getName(),
546 546
             $property->getTypeName(),
@@ -640,7 +640,7 @@  discard block
 block discarded – undo
640 640
     public static function illegalOrphanRemoval($className, $field)
641 641
     {
642 642
         return new self("Orphan removal is only allowed on one-to-one and one-to-many ".
643
-            "associations, but " . $className."#" .$field . " is not.");
643
+            "associations, but ".$className."#".$field." is not.");
644 644
     }
645 645
 
646 646
     /**
@@ -672,7 +672,7 @@  discard block
 block discarded – undo
672 672
      */
673 673
     public static function noInheritanceOnMappedSuperClass($className)
674 674
     {
675
-        return new self("It is not supported to define inheritance information on a mapped superclass '" . $className . "'.");
675
+        return new self("It is not supported to define inheritance information on a mapped superclass '".$className."'.");
676 676
     }
677 677
 
678 678
     /**
@@ -684,8 +684,8 @@  discard block
 block discarded – undo
684 684
     public static function mappedClassNotPartOfDiscriminatorMap($className, $rootClassName)
685 685
     {
686 686
         return new self(
687
-            "Entity '" . $className . "' has to be part of the discriminator map of '" . $rootClassName . "' " .
688
-            "to be properly mapped in the inheritance hierarchy. Alternatively you can make '".$className."' an abstract class " .
687
+            "Entity '".$className."' has to be part of the discriminator map of '".$rootClassName."' ".
688
+            "to be properly mapped in the inheritance hierarchy. Alternatively you can make '".$className."' an abstract class ".
689 689
             "to avoid this exception from occurring."
690 690
         );
691 691
     }
@@ -698,7 +698,7 @@  discard block
 block discarded – undo
698 698
      */
699 699
     public static function lifecycleCallbackMethodNotFound($className, $methodName)
700 700
     {
701
-        return new self("Entity '" . $className . "' has no method '" . $methodName . "' to be registered as lifecycle callback.");
701
+        return new self("Entity '".$className."' has no method '".$methodName."' to be registered as lifecycle callback.");
702 702
     }
703 703
 
704 704
     /**
@@ -744,7 +744,7 @@  discard block
 block discarded – undo
744 744
      */
745 745
     public static function invalidFetchMode($className, $annotation)
746 746
     {
747
-        return new self("Entity '" . $className . "' has a mapping with invalid fetch mode '" . $annotation . "'");
747
+        return new self("Entity '".$className."' has a mapping with invalid fetch mode '".$annotation."'");
748 748
     }
749 749
 
750 750
     /**
@@ -754,7 +754,7 @@  discard block
 block discarded – undo
754 754
      */
755 755
     public static function nonPrimaryidentityGeneratorNotSupported($className)
756 756
     {
757
-        return new self("Entity '". $className . "' has a an Identity strategy defined on a non-primary field. This is not supported.");
757
+        return new self("Entity '".$className."' has a an Identity strategy defined on a non-primary field. This is not supported.");
758 758
     }
759 759
 
760 760
     /**
@@ -764,7 +764,7 @@  discard block
 block discarded – undo
764 764
      */
765 765
     public static function compositeIdentityGeneratorNotSupported($className)
766 766
     {
767
-        return new self("Entity '". $className . "' has a composite identifier with with an Identity strategy. This is not supported.");
767
+        return new self("Entity '".$className."' has a composite identifier with with an Identity strategy. This is not supported.");
768 768
     }
769 769
 
770 770
     /**
@@ -776,7 +776,7 @@  discard block
 block discarded – undo
776 776
      */
777 777
     public static function invalidTargetEntityClass($targetEntity, $sourceEntity, $associationName)
778 778
     {
779
-        return new self("The target-entity '" . $targetEntity . "' cannot be found in '" . $sourceEntity."#".$associationName."'.");
779
+        return new self("The target-entity '".$targetEntity."' cannot be found in '".$sourceEntity."#".$associationName."'.");
780 780
     }
781 781
 
782 782
     /**
@@ -788,7 +788,7 @@  discard block
 block discarded – undo
788 788
      */
789 789
     public static function invalidCascadeOption(array $cascades, $className, $propertyName)
790 790
     {
791
-        $cascades = implode(", ", array_map(function ($e) { return "'" . $e . "'"; }, $cascades));
791
+        $cascades = implode(", ", array_map(function($e) { return "'".$e."'"; }, $cascades));
792 792
 
793 793
         return new self(sprintf(
794 794
             "You have specified invalid cascade options for %s::$%s: %s; available options: 'remove', 'persist', and 'refresh'",
@@ -820,7 +820,7 @@  discard block
 block discarded – undo
820 820
     {
821 821
         return new self(
822 822
             sprintf(
823
-                'Infinite nesting detected for embedded property %s::%s. ' .
823
+                'Infinite nesting detected for embedded property %s::%s. '.
824 824
                 'You cannot embed an embeddable from the same type inside an embeddable.',
825 825
                 $className,
826 826
                 $propertyName
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/ValueGeneratorsTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\ORM\Functional;
6 6
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Models/ValueGenerators/InheritanceGeneratorsChildB.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\Models\ValueGenerators;
6 6
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Models/ValueGenerators/BarGenerator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\Models\ValueGenerators;
6 6
 
Please login to merge, or discard this patch.
Doctrine/Tests/Models/ValueGenerators/CompositeGeneratedIdentifier.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\Models\ValueGenerators;
6 6
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Models/ValueGenerators/AssociationIdentifierTarget.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\Models\ValueGenerators;
6 6
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Models/ValueGenerators/InheritanceGeneratorsChildA.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\Models\ValueGenerators;
6 6
 
Please login to merge, or discard this patch.