r/PHPhelp • • Apr 07 '25

phpstan rule for trait method usage

I want to apply a rule that if a class uses a trait it also has to use some marked methods that are defined in that trait. Does anybody know/has a rule I could use?

Or any other qa tool extension for phpmd, phpcpd, phpcsfixer,psalm... Anything that I could use for a pre merge hook in gitlab.

A PhpStorm qa rule plugin would be my plan c.

TIA!

2 Upvotes

6 comments sorted by