Skip to content

PHPStan Rules 14.18.2

Choose a tag to compare

@TomasVotruba TomasVotruba released this 12 Oct 08:45
· 26 commits to main since this release
912bd59

New Rules ✨

Add PreferGenericTemplateOnSameUnionTypeRule (#349)

Flags a method whose param and return share the same class-type union, e.g. (A|B $node): A|B|null. Such a method usually returns the passed node, so a @template generic narrows the return to the passed type. Registered in the rector-rules set.