Problem/Motivation
As per #3461318: Enforce return types in all new methods and functions new classes that implement traits with methods that have a return type missing will fail phpstan.
Steps to reproduce
Proposed resolution
- In 11.x add proper return types. These are usually
void
as other types are often documented. - In 10.4.x add a
@return
annotation, or a@phpstan-return
annotation as that does not require a description, eg. for void return. - Update phpstan baseline for hundreds of entries we no longer require.