@@ -20,7 +20,7 @@ class FunctionCommentSniff extends PEARFunctionCommentSniff
20
20
/**
21
21
* Whether to skip inheritdoc comments.
22
22
*
23
- * @var bool
23
+ * @var boolean
24
24
*/
25
25
public $ skipIfInheritdoc = false ;
26
26
@@ -47,14 +47,15 @@ protected function processReturn(File $phpcsFile, $stackPtr, $commentStart)
47
47
$ tokens = $ phpcsFile ->getTokens ();
48
48
$ return = null ;
49
49
50
- if ($ this ->skipIfInheritdoc ) {
50
+ if ($ this ->skipIfInheritdoc === true ) {
51
51
for ($ i = $ commentStart ; $ i <= $ tokens [$ commentStart ]['comment_closer ' ]; $ i ++) {
52
52
$ trimmedContent = strtolower (trim ($ tokens [$ i ]['content ' ]));
53
53
if ($ trimmedContent === '{@inheritdoc} ' ) {
54
54
return ;
55
55
}
56
56
}
57
57
}
58
+
58
59
foreach ($ tokens [$ commentStart ]['comment_tags ' ] as $ tag ) {
59
60
if ($ tokens [$ tag ]['content ' ] === '@return ' ) {
60
61
if ($ return !== null ) {
@@ -204,7 +205,7 @@ protected function processThrows(File $phpcsFile, $stackPtr, $commentStart)
204
205
{
205
206
$ tokens = $ phpcsFile ->getTokens ();
206
207
207
- if ($ this ->skipIfInheritdoc ) {
208
+ if ($ this ->skipIfInheritdoc === true ) {
208
209
for ($ i = $ commentStart ; $ i <= $ tokens [$ commentStart ]['comment_closer ' ]; $ i ++) {
209
210
$ trimmedContent = strtolower (trim ($ tokens [$ i ]['content ' ]));
210
211
if ($ trimmedContent === '{@inheritdoc} ' ) {
@@ -288,7 +289,7 @@ protected function processParams(File $phpcsFile, $stackPtr, $commentStart)
288
289
289
290
$ tokens = $ phpcsFile ->getTokens ();
290
291
291
- if ($ this ->skipIfInheritdoc ) {
292
+ if ($ this ->skipIfInheritdoc === true ) {
292
293
for ($ i = $ commentStart ; $ i <= $ tokens [$ commentStart ]['comment_closer ' ]; $ i ++) {
293
294
$ trimmedContent = strtolower (trim ($ tokens [$ i ]['content ' ]));
294
295
if ($ trimmedContent === '{@inheritdoc} ' ) {
0 commit comments