You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of 1.10.48 (not present on 1.10.47) return types at level 3 report an error like: Method Foo::create() should return static(Foo) but returns Foo. using this example:
Bug report
Accordint to PHPStan doc https://phpstan.org/writing-php-code/phpdocs-basics Using
@return static
along with theself
native typehint means that the method returns a child classAs of 1.10.48 (not present on 1.10.47) return types at level 3 report an error like:
Method Foo::create() should return static(Foo) but returns Foo.
using this example:I don't think this is an error.
If it is an error in the code, how it could be solved?
If it is not an error, then it is a bug?
Thanks for PHPStan, it is geat!
Code snippet that reproduces the problem
https://phpstan.org/r/2eb3158b-0c10-4138-8e91-0daf17390e77
Expected output
The issue is reported incorrectly.
Did PHPStan help you today? Did it make you happy in any way?
PHPStan is a great tool, you are helping us (PhpCfdi) to maintain libre high-quality tools for Mexican PHP developers. Thanks a lot!
The text was updated successfully, but these errors were encountered: