- Issue created by @jackwrfuller
I think it would be useful to have the option to ignore the 'Missing function doc comment' error for private and/or protected methods.
This feature is already implemented for normal PHPCS, using the following in the phpcs.xml file:
<rule ref="PEAR.Commenting.FunctionComment">
<properties>
<property name="minimumVisibility" value="protected" />
</properties>
</rule>
A rough fix you can currently do is to disable Drupal.Commenting.FunctionComment and enable the PEAR equivalent using the above code. However, this gives another error 'Missing @return tag in function comment', since PEAR expects @return in PHPDocs in places where the Drupal standard does not (e.g because @inheritdoc).
I'm new to Drupal and PHP, so I am unsure how to answer the remaining headings of the default issue template.
Active
8.3
Coder Sniffer