Skip to content

SimpleXMLElement childrent method returns self instead of static #5700

@marcelthole

Description

@marcelthole

Bug report

With the upgrade from 0.12.98 => 0.12.99 the SimpleXMLElement children returns self instead of static

Code snippet that reproduces the problem

https://phpstan.org/r/8b1dcfe2-b5bb-419e-9cf3-38b13748cc85

Expected output

The return type of SimpleXMLElement->children() should be the static class. In this case MySimpleXML

Did PHPStan help you today? Did it make you happy in any way?

Yes, PHPStan helps me everyday. Static code analysis is one of the best features in the PHP economy in the last years. 🥳

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions