The project that I am currently working on has the following coding standard.
Don't add phpdoc to inherited methods if it is just a copy of the parent class method's phpdoc. Add phpdoc to inherited methods only if it is different.
I am trying to achieve this with phpcs and want to conditionally enable the squiz.commenting.functioncomment.missing
phpcs sniff.
I understand that phpcs will not have runtime information about the class (and its inheritance), so I don't think anything can be done at sniff or ruleset level.
But are there any other ways by which I can override the output of the phpcs command output? If yes, then I can hook into that code and then can conditionally hide the error messages if needed.
I see that we can use a bootstrap file with phpcs. Does the bootstrap file allow us to filter (or modify) the list of errors and warnings outputted by phpcs?