Skip to content

Commit 312be6d

Browse files
gsherwoodjrfnl
authored andcommitted
Updated Customisable Sniff Properties (markdown)
1 parent ed22d96 commit 312be6d

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

wiki/Customisable-Sniff-Properties.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ For more information about changing sniff behaviour by customising your ruleset,
2525
* [Generic.WhiteSpace.ScopeIndent](#genericwhitespacescopeindent)
2626
* [Generic.WhiteSpace.SpreadOperatorSpacingAfter](#genericwhitespacespreadoperatorspacingafter)
2727
* PEAR Sniffs
28+
* [PEAR.Commenting.FunctionComment](#pearcommentingfunctioncomment)
2829
* [PEAR.ControlStructures.ControlSignature](#pearcontrolstructurescontrolsignature)
2930
* [PEAR.ControlStructures.MultiLineCondition](#pearcontrolstructuresmultilinecondition)
3031
* [PEAR.Formatting.MultiLineAssignment](#pearformattingmultilineassignment)
@@ -46,6 +47,7 @@ For more information about changing sniff behaviour by customising your ruleset,
4647
* [PSR12.Operators.OperatorSpacing](#psr12operatorsoperatorspacing)
4748
* Squiz Sniffs
4849
* [Squiz.Classes.ClassDeclaration](#squizclassesclassdeclaration)
50+
* [Squiz.Commenting.FunctionComment](#squizcommentingfunctioncomment)
4951
* [Squiz.Commenting.LongConditionClosingComment](#squizcommentinglongconditionclosingcomment)
5052
* [Squiz.ControlStructures.ControlSignature](#squizcontrolstructurescontrolsignature)
5153
* [Squiz.ControlStructures.ForEachLoopDeclaration](#squizcontrolstructuresforeachloopdeclaration)
@@ -623,6 +625,24 @@ If you want to allow a newline after the operator, you can set the `ignoreNewlin
623625

624626

625627

628+
## PEAR Sniffs
629+
630+
### PEAR.Commenting.FunctionComment
631+
632+
Property Name | Type | Default | Available Since
633+
----------------- | ------ | ------- | --------------
634+
minimumVisibility | string | private | 3.6.0
635+
636+
This sniff verifies that functions are documented using a docblock. By default, all functions are checked regardless of their visibility, but the sniff can be told to ignore private and protected functions using the `minimumVisibility` property. When set to `protected`, only public and protected functions will be checked. When set to `public`, only public functions will be checked.
637+
638+
```xml
639+
<rule ref="PEAR.Commenting.FunctionComment">
640+
<properties>
641+
<property name="minimumVisibility" value="public" />
642+
</properties>
643+
</rule>
644+
```
645+
626646
## PEAR Sniffs
627647

628648
### PEAR.ControlStructures.ControlSignature
@@ -1037,6 +1057,24 @@ One of the rules that this sniff enforces is the indent of a list of implemented
10371057
</rule>
10381058
```
10391059

1060+
### Squiz.Commenting.FunctionComment
1061+
1062+
Property Name | Type | Default | Available Since
1063+
----------------- | ------ | ------- | --------------
1064+
minimumVisibility | string | private | 3.6.0
1065+
1066+
> Note: The `minimumVisibility` property is inherited from the [PEAR.Commenting.FunctionComment](#pearcommentingfunctioncomment) sniff.
1067+
1068+
This sniff verifies that functions are documented using a docblock. By default, all functions are checked regardless of their visibility, but the sniff can be told to ignore private and protected functions using the `minimumVisibility` property. When set to `protected`, only public and protected functions will be checked. When set to `public`, only public functions will be checked.
1069+
1070+
```xml
1071+
<rule ref="Squiz.Commenting.FunctionComment">
1072+
<properties>
1073+
<property name="minimumVisibility" value="public" />
1074+
</properties>
1075+
</rule>
1076+
```
1077+
10401078
### Squiz.Commenting.LongConditionClosingComment
10411079

10421080
Property Name | Type | Default | Available Since

0 commit comments

Comments
 (0)