-
-
Notifications
You must be signed in to change notification settings - Fork 934
Closed
Labels
Milestone
Description
Bug report
PHPStan thinks every direct call to an attribute on a SimpleXmlElement will return a SimpleXmlElement. This is not always true:
https://phpstan.org/r/f9336943-20db-4b3e-a9ba-671b6f58bd78
https://3v4l.org/kWSfE
While the first attribute does indeed return a SimpleXmlElement(even when the xml doesn't contain this element), this is not true for the second one.
PHPStan should not complain about always true checks in this context.