TomasVotruba / unused-public

Find Unused Public Elements in Your Code
https://tomasvotruba.com/blog/can-phpstan-find-dead-public-methods/
MIT License
151 stars 12 forks source link

Allow usage of internal or required to skip checks #107

Closed neoighodaro closed 7 months ago

neoighodaro commented 7 months ago

In certain scenarios, like overriding model properties like timestamps it is flagged by PHPStan. This is likely because the timestamps property is set via a trait? Not sure. Either way, the easy solution would be to tag @api to the property override.

I imagined introducing skips for @internal which works best for properties like $timestamps or @required which could work for model method definitions, would be more fitting.

Thought about allowing the user also define which tags they want to use for ignoring but that seemed like an overkill.