Skip to content

Commit 7274ada

Browse files
Fix
1 parent e58c470 commit 7274ada

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Rules/Doctrine/ORM/EntityColumnRule.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
use PHPStan\Type\TypehintHelper;
2323
use PHPStan\Type\TypeTraverser;
2424
use PHPStan\Type\TypeUtils;
25-
use PHPStan\Type\UnionType;
2625
use PHPStan\Type\VerbosityLevel;
2726
use Throwable;
2827
use function count;
@@ -173,8 +172,8 @@ public function processNode(Node $node, Scope $scope): array
173172
}
174173

175174
if (count($enumTypes) > 0) {
176-
$writableToPropertyType = new UnionType($enumTypes);
177-
$writableToDatabaseType = new UnionType($enumTypes);
175+
$writableToPropertyType = TypeCombinator::union(...$enumTypes);
176+
$writableToDatabaseType = TypeCombinator::union(...$enumTypes);
178177
}
179178
}
180179
}

0 commit comments

Comments
 (0)