diff --git a/src/Psalm/Internal/Provider/PropertyTypeProvider/DomDocumentPropertyTypeProvider.php b/src/Psalm/Internal/Provider/PropertyTypeProvider/DomDocumentPropertyTypeProvider.php index c90c848bf..f49d952dc 100644 --- a/src/Psalm/Internal/Provider/PropertyTypeProvider/DomDocumentPropertyTypeProvider.php +++ b/src/Psalm/Internal/Provider/PropertyTypeProvider/DomDocumentPropertyTypeProvider.php @@ -15,7 +15,7 @@ class DomDocumentPropertyTypeProvider implements PropertyTypeProviderInterface public static function getPropertyType(PropertyTypeProviderEvent $event): ?Union { if (strtolower($event->getPropertyName()) === 'documentelement') { - $type = new Union([new TNamedObject('DomDocument'), new TNull()]); + $type = new Union([new TNamedObject('DOMElement'), new TNull()]); $type->ignore_nullable_issues = true; return $type;