From 57d0336a9ce8e5e6e747a2a2b21e483d92dee7c8 Mon Sep 17 00:00:00 2001 From: orklah Date: Sat, 18 Sep 2021 08:49:52 +0200 Subject: [PATCH] fix wrong result type --- .../PropertyTypeProvider/DomDocumentPropertyTypeProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;