File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ final class Chadicus_Sniffs_Commenting_FunctionCommentSniff extends Squiz_Sniffs_Commenting_FunctionCommentSniff
4+ {
5+ /**
6+ * Ensures only public methods are processed.
7+ *
8+ * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
9+ * @param int $stackPtr The position of the current token in the stack passed in $tokens.
10+ *
11+ * @return void
12+ */
13+ public function process (PHP_CodeSniffer_File $ phpcsFile , $ stackPtr )
14+ {
15+ $ methodProperties = $ phpcsFile ->getMethodProperties ($ stackPtr );
16+ if ($ methodProperties ['scope ' ] !== 'public ' ) {
17+ return ;
18+ }
19+
20+ parent ::process ($ phpcsFile , $ stackPtr );
21+ }
22+ }
Original file line number Diff line number Diff line change 1010 <rule ref =" Generic.CodeAnalysis.UselessOverridingMethod" />
1111 <rule ref =" Generic.ControlStructures.InlineControlStructure" />
1212 <rule ref =" Squiz.Commenting.DocCommentAlignment" />
13- <rule ref =" Squiz.Commenting.FunctionComment" />
1413 <rule ref =" Squiz.Commenting.FunctionCommentThrowTag" />
1514 <rule ref =" Squiz.Commenting.VariableComment" />
1615 <rule ref =" Generic.Commenting.Fixme" />
You can’t perform that action at this time.
0 commit comments