I'm implementing PHPCS for an existing project. I want to check if functions has a docblock.
I'm currently using the following rules:
<rule ref="Squiz.Commenting.FunctionComment" />
<rule ref="Squiz.Commenting.FunctionCommentThrowTag" />
<rule ref="Squiz.Commenting.VariableComment" />
<rule ref="Squiz.Commenting.DocCommentAlignment"/>
<rule ref="Generic.Files.LineLength">
<properties>
<property name="absoluteLineLimit" value="120"/>
<property name="lineLimit" value="120"/>
</properties>
</rule>
<!-- Ban some functions -->
<rule ref="Generic.PHP.ForbiddenFunctions">
<properties>
<property name="forbiddenFunctions" type="array">
<element key="print" value="echo"/>
<element key="var_dump" value="null"/>
<element key="dd" value="null"/>
<element key="dump" value="null"/>
<element key="echo" value="null"/>
<element key="print_r" value="null"/>
<element key="var_export" value="null"/>
</property>
</properties>
</rule>
But i get a lot of issue's that a Parameter comment should start with a capital letter and end with a fullstop.
How can i make the rules less strict regarding the capital letters & fullstops
Edit: Currently code block also wants to align the parameters. This creates a lot of ugly whitespace between @param array
and $parameter
. Can i remove this rule aswell in phpcs & phpcbf?