Closed kyryl-bogach closed 6 months ago
Thanks!
Oh. I've just looked again.
If the intended method is static, the static keyword can be placed before the return type to communicate that. In that case, a return type MUST be provided, as static on its own would mean that the method returns an instance of the child class which the method is called on.
https://docs.phpdoc.org/latest/guide/references/phpdoc/tags/method.html
PhpStorm did not show me an error either. I actually didn't know that it had to be specified for static methods. Now I know and it no longer occurs.
Fix fallback method definition that is lacking "void", occasioning code analyzers like PHPStan to fail. This was recently introduced here.
The previous PHPdoc is not a valid php-doc comment and causes issues on, for example, PHPStan when analyzing the code: