-
-
Notifications
You must be signed in to change notification settings - Fork 934
Closed
phpstan/phpstan-src
#4373Description
Bug report
The return type for DOMXPath::query() is stubbed as DOMNodeList<DOMNode>|false at https://github.com/phpstan/phpstan-src/blob/afe24f012552aec51ea22bbadfa38aeb9392460e/stubs/dom.stub#L89. But the actual return type is DOMNodeList<DOMNode|DOMNameSpaceNode>|false.
The PHPStorm stubs have the correct type
https://github.com/JetBrains/phpstorm-stubs/blob/d1ee5e570343bd4276a3d5959e6e1c2530b006d0/dom/dom_c.php#L2499.
Code snippet that reproduces the problem
https://phpstan.org/r/9c5144b1-f9b2-48e5-a108-cd4151adc47d
Expected output
No errors.
Did PHPStan help you today? Did it make you happy in any way?
No response
Metadata
Metadata
Assignees
Labels
No labels