-
-
Notifications
You must be signed in to change notification settings - Fork 946
Closed
Labels
Milestone
Description
Bug report
When a method is documented as having a fluent interface with @return $this and uses @param-this-out, the out type is not taken into account for the return value.
Code snippet that reproduces the problem
https://phpstan.org/r/dd0f11fe-7f22-49d4-bdbb-172337007753
Expected output
Both prophesize() and prophesize2() should report the same errors. But prophesize() currently reports an error on the return statement using the return value of the fluent API.
Did PHPStan help you today? Did it make you happy in any way?
this new @param-this-out feature is really nice, allowing us to start adding generic types in Prophecy itself.
Reactions are currently unavailable