We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f6f5763 commit 61d568eCopy full SHA for 61d568e
src/PhpDoc/TypeNodeResolver.php
@@ -710,9 +710,7 @@ static function (string $variance): TemplateTypeVariance {
710
} elseif ($mainTypeName === 'enum-string') {
711
if (count($genericTypes) === 1) {
712
$genericType = $genericTypes[0];
713
- if ($genericType->isObject()->yes() || $genericType instanceof MixedType) {
714
- return new GenericClassStringType(TypeCombinator::intersect($genericType, new ObjectType('UnitEnum')));
715
- }
+ return new GenericClassStringType(TypeCombinator::intersect($genericType, new ObjectType('UnitEnum')));
716
}
717
718
return new ErrorType();
0 commit comments