1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-12 09:19:40 +01:00

fix wrong result type

This commit is contained in:
orklah 2021-09-18 08:49:52 +02:00
parent a1bd339cc1
commit 57d0336a9c

View File

@ -15,7 +15,7 @@ class DomDocumentPropertyTypeProvider implements PropertyTypeProviderInterface
public static function getPropertyType(PropertyTypeProviderEvent $event): ?Union public static function getPropertyType(PropertyTypeProviderEvent $event): ?Union
{ {
if (strtolower($event->getPropertyName()) === 'documentelement') { 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; $type->ignore_nullable_issues = true;
return $type; return $type;