Failed Conditions
Pull Request — develop (#6600)
by Mike
62:56
created
lib/Doctrine/ORM/Mapping/DiscriminatorColumnMetadata.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 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
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/CacheMetadata.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 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
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/ClassMetadata.php 1 patch
Spacing   +49 added lines, -49 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
 
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
      *
314 314
      * @return void
315 315
      */
316
-    public function setCache(?CacheMetadata $cache = null)
316
+    public function setCache(? CacheMetadata $cache = null)
317 317
     {
318 318
         $this->cache = $cache;
319 319
     }
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
     /**
322 322
      * @return CacheMetadata|null
323 323
      */
324
-    public function getCache(): ?CacheMetadata
324
+    public function getCache(): ? CacheMetadata
325 325
     {
326 326
         return $this->cache;
327 327
     }
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
     /**
330 330
      * @return \ReflectionClass|null
331 331
      */
332
-    public function getReflectionClass() : ?\ReflectionClass
332
+    public function getReflectionClass() : ? \ReflectionClass
333 333
     {
334 334
         return $this->reflectionClass;
335 335
     }
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
      */
358 358
     public function __toString()
359 359
     {
360
-        return __CLASS__ . '@' . spl_object_hash($this);
360
+        return __CLASS__.'@'.spl_object_hash($this);
361 361
     }
362 362
 
363 363
     /**
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
         // Restore ReflectionClass and properties
462 462
         $this->reflectionClass = $reflService->getClass($this->name);
463 463
 
464
-        if (! $this->reflectionClass) {
464
+        if ( ! $this->reflectionClass) {
465 465
             return;
466 466
         }
467 467
 
@@ -536,11 +536,11 @@  discard block
 block discarded – undo
536 536
         }
537 537
 
538 538
         // Verify & complete identifier mapping
539
-        if (! $this->identifier) {
539
+        if ( ! $this->identifier) {
540 540
             throw MappingException::identifierRequired($this->name);
541 541
         }
542 542
 
543
-        $explicitlyGeneratedProperties = array_filter($this->properties, function (Property $property) : bool {
543
+        $explicitlyGeneratedProperties = array_filter($this->properties, function(Property $property) : bool {
544 544
             return $property instanceof FieldMetadata
545 545
                 && $property->isPrimaryKey()
546 546
                 && $property->hasValueGenerator();
@@ -561,8 +561,8 @@  discard block
 block discarded – undo
561 561
     public function validateAssociations()
562 562
     {
563 563
         array_map(
564
-            function (Property $property) {
565
-                if (! ($property instanceof AssociationMetadata)) {
564
+            function(Property $property) {
565
+                if ( ! ($property instanceof AssociationMetadata)) {
566 566
                     return;
567 567
                 }
568 568
 
@@ -618,11 +618,11 @@  discard block
 block discarded – undo
618 618
      */
619 619
     public function isIdentifier($fieldName)
620 620
     {
621
-        if (! $this->identifier) {
621
+        if ( ! $this->identifier) {
622 622
             return false;
623 623
         }
624 624
 
625
-        if (! $this->isIdentifierComposite()) {
625
+        if ( ! $this->isIdentifierComposite()) {
626 626
             return $fieldName === $this->identifier[0];
627 627
         }
628 628
 
@@ -650,7 +650,7 @@  discard block
 block discarded – undo
650 650
      */
651 651
     public function getNamedQuery($queryName)
652 652
     {
653
-        if (! isset($this->namedQueries[$queryName])) {
653
+        if ( ! isset($this->namedQueries[$queryName])) {
654 654
             throw MappingException::queryNotFound($this->name, $queryName);
655 655
         }
656 656
 
@@ -710,7 +710,7 @@  discard block
 block discarded – undo
710 710
      */
711 711
     public function getSqlResultSetMapping($name)
712 712
     {
713
-        if (! isset($this->sqlResultSetMappings[$name])) {
713
+        if ( ! isset($this->sqlResultSetMappings[$name])) {
714 714
             throw MappingException::resultMappingNotFound($this->name, $name);
715 715
         }
716 716
 
@@ -745,7 +745,7 @@  discard block
 block discarded – undo
745 745
             $property->setColumnName($columnName);
746 746
         }
747 747
 
748
-        if (! $this->isMappedSuperclass) {
748
+        if ( ! $this->isMappedSuperclass) {
749 749
             $property->setTableName($this->getTableName());
750 750
         }
751 751
 
@@ -765,7 +765,7 @@  discard block
 block discarded – undo
765 765
                 throw MappingException::sqlConversionNotAllowedForPrimaryKeyProperties($property);
766 766
             };
767 767
 
768
-            if (! in_array($fieldName, $this->identifier)) {
768
+            if ( ! in_array($fieldName, $this->identifier)) {
769 769
                 $this->identifier[] = $fieldName;
770 770
             }
771 771
         }
@@ -819,7 +819,7 @@  discard block
 block discarded – undo
819 819
         $fieldName    = $property->getName();
820 820
         $targetEntity = $property->getTargetEntity();
821 821
 
822
-        if (! $targetEntity) {
822
+        if ( ! $targetEntity) {
823 823
             throw MappingException::missingTargetEntity($fieldName);
824 824
         }
825 825
 
@@ -850,7 +850,7 @@  discard block
 block discarded – undo
850 850
                 $this->identifier[] = $property->getName();
851 851
             }
852 852
 
853
-            if ($this->cache && !$property->getCache()) {
853
+            if ($this->cache && ! $property->getCache()) {
854 854
                 throw CacheException::nonCacheableEntityAssociation($this->name, $fieldName);
855 855
             }
856 856
 
@@ -903,7 +903,7 @@  discard block
 block discarded – undo
903 903
             foreach ($property->getJoinColumns() as $joinColumn) {
904 904
                 if ($property instanceof OneToOneAssociationMetadata && $this->inheritanceType !== InheritanceType::SINGLE_TABLE) {
905 905
                     if (1 === count($property->getJoinColumns())) {
906
-                        if (! $property->isPrimaryKey()) {
906
+                        if ( ! $property->isPrimaryKey()) {
907 907
                             $joinColumn->setUnique(true);
908 908
                         }
909 909
                     } else {
@@ -911,13 +911,13 @@  discard block
 block discarded – undo
911 911
                     }
912 912
                 }
913 913
 
914
-                $joinColumn->setTableName(! $this->isMappedSuperclass ? $this->getTableName() : null);
914
+                $joinColumn->setTableName( ! $this->isMappedSuperclass ? $this->getTableName() : null);
915 915
 
916
-                if (! $joinColumn->getColumnName()) {
916
+                if ( ! $joinColumn->getColumnName()) {
917 917
                     $joinColumn->setColumnName($this->namingStrategy->joinColumnName($fieldName, $this->name));
918 918
                 }
919 919
 
920
-                if (! $joinColumn->getReferencedColumnName()) {
920
+                if ( ! $joinColumn->getReferencedColumnName()) {
921 921
                     $joinColumn->setReferencedColumnName($this->namingStrategy->referenceColumnName());
922 922
                 }
923 923
 
@@ -945,7 +945,7 @@  discard block
 block discarded – undo
945 945
         if ($property->isOrphanRemoval()) {
946 946
             $cascades = $property->getCascade();
947 947
 
948
-            if (! in_array('remove', $cascades)) {
948
+            if ( ! in_array('remove', $cascades)) {
949 949
                 $cascades[] = 'remove';
950 950
 
951 951
                 $property->setCascade($cascades);
@@ -1013,14 +1013,14 @@  discard block
 block discarded – undo
1013 1013
         $property->setOwningSide(false);
1014 1014
 
1015 1015
         // OneToMany MUST have mappedBy
1016
-        if (! $property->getMappedBy()) {
1016
+        if ( ! $property->getMappedBy()) {
1017 1017
             throw MappingException::oneToManyRequiresMappedBy($property->getName());
1018 1018
         }
1019 1019
 
1020 1020
         if ($property->isOrphanRemoval()) {
1021 1021
             $cascades = $property->getCascade();
1022 1022
 
1023
-            if (! in_array('remove', $cascades)) {
1023
+            if ( ! in_array('remove', $cascades)) {
1024 1024
                 $cascades[] = 'remove';
1025 1025
 
1026 1026
                 $property->setCascade($cascades);
@@ -1043,7 +1043,7 @@  discard block
 block discarded – undo
1043 1043
 
1044 1044
             $property->setJoinTable($joinTable);
1045 1045
 
1046
-            if (! $joinTable->getName()) {
1046
+            if ( ! $joinTable->getName()) {
1047 1047
                 $joinTableName = $this->namingStrategy->joinTableName(
1048 1048
                     $property->getSourceEntity(),
1049 1049
                     $property->getTargetEntity(),
@@ -1055,7 +1055,7 @@  discard block
 block discarded – undo
1055 1055
 
1056 1056
             $selfReferencingEntityWithoutJoinColumns = $property->getSourceEntity() == $property->getTargetEntity() && ! $joinTable->hasColumns();
1057 1057
 
1058
-            if (! $joinTable->getJoinColumns()) {
1058
+            if ( ! $joinTable->getJoinColumns()) {
1059 1059
                 $referencedColumnName = $this->namingStrategy->referenceColumnName();
1060 1060
                 $sourceReferenceName  = $selfReferencingEntityWithoutJoinColumns ? 'source' : $referencedColumnName;
1061 1061
                 $columnName           = $this->namingStrategy->joinKeyColumnName($property->getSourceEntity(), $sourceReferenceName);
@@ -1068,7 +1068,7 @@  discard block
 block discarded – undo
1068 1068
                 $joinTable->addJoinColumn($joinColumn);
1069 1069
             }
1070 1070
 
1071
-            if (! $joinTable->getInverseJoinColumns()) {
1071
+            if ( ! $joinTable->getInverseJoinColumns()) {
1072 1072
                 $referencedColumnName = $this->namingStrategy->referenceColumnName();
1073 1073
                 $targetReferenceName  = $selfReferencingEntityWithoutJoinColumns ? 'target' : $referencedColumnName;
1074 1074
                 $columnName           = $this->namingStrategy->joinKeyColumnName($property->getTargetEntity(), $targetReferenceName);
@@ -1082,13 +1082,13 @@  discard block
 block discarded – undo
1082 1082
             }
1083 1083
 
1084 1084
             foreach ($joinTable->getJoinColumns() as $joinColumn) {
1085
-                if (! $joinColumn->getReferencedColumnName()) {
1085
+                if ( ! $joinColumn->getReferencedColumnName()) {
1086 1086
                     $joinColumn->setReferencedColumnName($this->namingStrategy->referenceColumnName());
1087 1087
                 }
1088 1088
 
1089 1089
                 $referencedColumnName = $joinColumn->getReferencedColumnName();
1090 1090
 
1091
-                if (! $joinColumn->getColumnName()) {
1091
+                if ( ! $joinColumn->getColumnName()) {
1092 1092
                     $columnName = $this->namingStrategy->joinKeyColumnName(
1093 1093
                         $property->getSourceEntity(),
1094 1094
                         $referencedColumnName
@@ -1099,13 +1099,13 @@  discard block
 block discarded – undo
1099 1099
             }
1100 1100
 
1101 1101
             foreach ($joinTable->getInverseJoinColumns() as $inverseJoinColumn) {
1102
-                if (! $inverseJoinColumn->getReferencedColumnName()) {
1102
+                if ( ! $inverseJoinColumn->getReferencedColumnName()) {
1103 1103
                     $inverseJoinColumn->setReferencedColumnName($this->namingStrategy->referenceColumnName());
1104 1104
                 }
1105 1105
 
1106 1106
                 $referencedColumnName = $inverseJoinColumn->getReferencedColumnName();
1107 1107
 
1108
-                if (! $inverseJoinColumn->getColumnName()) {
1108
+                if ( ! $inverseJoinColumn->getColumnName()) {
1109 1109
                     $columnName = $this->namingStrategy->joinKeyColumnName(
1110 1110
                         $property->getTargetEntity(),
1111 1111
                         $referencedColumnName
@@ -1198,7 +1198,7 @@  discard block
 block discarded – undo
1198 1198
             // Association defined as Id field
1199 1199
             $targetClass = $em->getClassMetadata($property->getTargetEntity());
1200 1200
 
1201
-            if (! $property->isOwningSide()) {
1201
+            if ( ! $property->isOwningSide()) {
1202 1202
                 $property    = $targetClass->getProperty($property->getMappedBy());
1203 1203
                 $targetClass = $em->getClassMetadata($property->getTargetEntity());
1204 1204
             }
@@ -1249,11 +1249,11 @@  discard block
 block discarded – undo
1249 1249
     {
1250 1250
         $schema = empty($this->getSchemaName())
1251 1251
             ? ''
1252
-            : $this->getSchemaName() . '_'
1252
+            : $this->getSchemaName().'_'
1253 1253
         ;
1254 1254
 
1255 1255
         // replace dots with underscores because PostgreSQL creates temporary tables in a special schema
1256
-        return $schema . $this->getTableName() . '_id_tmp';
1256
+        return $schema.$this->getTableName().'_id_tmp';
1257 1257
     }
1258 1258
 
1259 1259
     /**
@@ -1339,7 +1339,7 @@  discard block
 block discarded – undo
1339 1339
     {
1340 1340
         $fieldName = $property->getName();
1341 1341
 
1342
-        if (! isset($this->properties[$fieldName])) {
1342
+        if ( ! isset($this->properties[$fieldName])) {
1343 1343
             throw MappingException::invalidOverrideFieldName($this->name, $fieldName);
1344 1344
         }
1345 1345
 
@@ -1459,7 +1459,7 @@  discard block
 block discarded – undo
1459 1459
      *
1460 1460
      * @return LocalColumnMetadata|null
1461 1461
      */
1462
-    public function getColumn(string $columnName): ?LocalColumnMetadata
1462
+    public function getColumn(string $columnName): ? LocalColumnMetadata
1463 1463
     {
1464 1464
         foreach ($this->properties as $property) {
1465 1465
             if ($property instanceof LocalColumnMetadata && $property->getColumnName() === $columnName) {
@@ -1566,7 +1566,7 @@  discard block
 block discarded – undo
1566 1566
         $declaringClass    = $property->getDeclaringClass();
1567 1567
 
1568 1568
         if ($inheritedProperty instanceof FieldMetadata) {
1569
-            if (! $declaringClass->isMappedSuperclass) {
1569
+            if ( ! $declaringClass->isMappedSuperclass) {
1570 1570
                 $inheritedProperty->setTableName($property->getTableName());
1571 1571
             }
1572 1572
 
@@ -1624,7 +1624,7 @@  discard block
 block discarded – undo
1624 1624
             throw MappingException::duplicateQueryMapping($this->name, $name);
1625 1625
         }
1626 1626
 
1627
-        if (! isset($queryMapping['resultClass']) && ! isset($queryMapping['resultSetMapping'])) {
1627
+        if ( ! isset($queryMapping['resultClass']) && ! isset($queryMapping['resultSetMapping'])) {
1628 1628
             throw MappingException::missingQueryMapping($this->name, $name);
1629 1629
         }
1630 1630
 
@@ -1647,7 +1647,7 @@  discard block
 block discarded – undo
1647 1647
      */
1648 1648
     public function addSqlResultSetMapping(array $resultMapping)
1649 1649
     {
1650
-        if (!isset($resultMapping['name'])) {
1650
+        if ( ! isset($resultMapping['name'])) {
1651 1651
             throw MappingException::nameIsMandatoryForSqlResultSetMapping($this->name);
1652 1652
         }
1653 1653
 
@@ -1657,7 +1657,7 @@  discard block
 block discarded – undo
1657 1657
 
1658 1658
         if (isset($resultMapping['entities'])) {
1659 1659
             foreach ($resultMapping['entities'] as $key => $entityResult) {
1660
-                if (! isset($entityResult['entityClass'])) {
1660
+                if ( ! isset($entityResult['entityClass'])) {
1661 1661
                     throw MappingException::missingResultSetMappingEntity($this->name, $resultMapping['name']);
1662 1662
                 }
1663 1663
 
@@ -1670,11 +1670,11 @@  discard block
 block discarded – undo
1670 1670
 
1671 1671
                 if (isset($entityResult['fields'])) {
1672 1672
                     foreach ($entityResult['fields'] as $k => $field) {
1673
-                        if (! isset($field['name'])) {
1673
+                        if ( ! isset($field['name'])) {
1674 1674
                             throw MappingException::missingResultSetMappingFieldName($this->name, $resultMapping['name']);
1675 1675
                         }
1676 1676
 
1677
-                        if (! isset($field['column'])) {
1677
+                        if ( ! isset($field['column'])) {
1678 1678
                             $fieldName = $field['name'];
1679 1679
 
1680 1680
                             if (strpos($fieldName, '.')) {
@@ -1698,7 +1698,7 @@  discard block
 block discarded – undo
1698 1698
      *
1699 1699
      * @return void
1700 1700
      */
1701
-    public function setCustomRepositoryClassName(?string $repositoryClassName)
1701
+    public function setCustomRepositoryClassName(? string $repositoryClassName)
1702 1702
     {
1703 1703
         $this->customRepositoryClassName = $repositoryClassName;
1704 1704
     }
@@ -1706,7 +1706,7 @@  discard block
 block discarded – undo
1706 1706
     /**
1707 1707
      * @return string|null
1708 1708
      */
1709
-    public function getCustomRepositoryClassName() : ?string
1709
+    public function getCustomRepositoryClassName() : ? string
1710 1710
     {
1711 1711
         return $this->customRepositoryClassName;
1712 1712
     }
@@ -1781,11 +1781,11 @@  discard block
 block discarded – undo
1781 1781
             'method' => $method,
1782 1782
         ];
1783 1783
 
1784
-        if (! class_exists($class)) {
1784
+        if ( ! class_exists($class)) {
1785 1785
             throw MappingException::entityListenerClassNotFound($class, $this->name);
1786 1786
         }
1787 1787
 
1788
-        if (! method_exists($class, $method)) {
1788
+        if ( ! method_exists($class, $method)) {
1789 1789
             throw MappingException::entityListenerMethodNotFound($class, $method, $this->name);
1790 1790
         }
1791 1791
 
@@ -1859,7 +1859,7 @@  discard block
 block discarded – undo
1859 1859
             return;
1860 1860
         }
1861 1861
 
1862
-        if (! (class_exists($className) || interface_exists($className))) {
1862
+        if ( ! (class_exists($className) || interface_exists($className))) {
1863 1863
             throw MappingException::invalidClassInDiscriminatorMap($className, $this->name);
1864 1864
         }
1865 1865
 
@@ -1956,7 +1956,7 @@  discard block
 block discarded – undo
1956 1956
         $namespace = $this->reflectionClass->getNamespaceName();
1957 1957
 
1958 1958
         if ($className !== null && strpos($className, '\\') === false && $namespace) {
1959
-            return ltrim($namespace . '\\' . $className, '\\');
1959
+            return ltrim($namespace.'\\'.$className, '\\');
1960 1960
         }
1961 1961
 
1962 1962
         return ltrim($className, '\\');
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/VersionFieldMetadata.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 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
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/DefaultEntityListenerResolver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 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
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/CacheUsage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 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
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/FieldMetadata.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 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
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/ReflectionEmbeddedProperty.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\ORM\Mapping;
6 6
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/EntityListenerResolver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 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
 
Please login to merge, or discard this patch.