Skip to content

Commit

Permalink
revert 944673f
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed May 10, 2024
1 parent 1ef2c20 commit 3af787f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Type/TypeCombinator.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
use PHPStan\Type\Constant\ConstantFloatType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\Enum\EnumCaseObjectType;
use PHPStan\Type\Generic\GenericClassStringType;
use PHPStan\Type\Generic\TemplateArrayType;
use PHPStan\Type\Generic\TemplateBenevolentUnionType;
Expand Down Expand Up @@ -201,7 +200,8 @@ public static function union(Type ...$types): Type
if ($types[$i] instanceof StringType && !$types[$i] instanceof ClassStringType) {
$hasGenericScalarTypes[ConstantStringType::class] = true;
}
if ($types[$i] instanceof EnumCaseObjectType) {
$enumCases = $types[$i]->getEnumCases();
if (count($enumCases) === 1) {
$enumCaseTypes[$types[$i]->describe(VerbosityLevel::cache())] = $types[$i];

unset($types[$i]);
Expand Down

0 comments on commit 3af787f

Please sign in to comment.