@@ -20,7 +20,7 @@ class FunctionCommentSniff extends PEARFunctionCommentSniff
2020 /**
2121 * Whether to skip inheritdoc comments.
2222 *
23- * @var bool
23+ * @var boolean
2424 */
2525 public $ skipIfInheritdoc = false ;
2626
@@ -47,14 +47,15 @@ protected function processReturn(File $phpcsFile, $stackPtr, $commentStart)
4747 $ tokens = $ phpcsFile ->getTokens ();
4848 $ return = null ;
4949
50- if ($ this ->skipIfInheritdoc ) {
50+ if ($ this ->skipIfInheritdoc === true ) {
5151 for ($ i = $ commentStart ; $ i <= $ tokens [$ commentStart ]['comment_closer ' ]; $ i ++) {
5252 $ trimmedContent = strtolower (trim ($ tokens [$ i ]['content ' ]));
5353 if ($ trimmedContent === '{@inheritdoc} ' ) {
5454 return ;
5555 }
5656 }
5757 }
58+
5859 foreach ($ tokens [$ commentStart ]['comment_tags ' ] as $ tag ) {
5960 if ($ tokens [$ tag ]['content ' ] === '@return ' ) {
6061 if ($ return !== null ) {
@@ -204,7 +205,7 @@ protected function processThrows(File $phpcsFile, $stackPtr, $commentStart)
204205 {
205206 $ tokens = $ phpcsFile ->getTokens ();
206207
207- if ($ this ->skipIfInheritdoc ) {
208+ if ($ this ->skipIfInheritdoc === true ) {
208209 for ($ i = $ commentStart ; $ i <= $ tokens [$ commentStart ]['comment_closer ' ]; $ i ++) {
209210 $ trimmedContent = strtolower (trim ($ tokens [$ i ]['content ' ]));
210211 if ($ trimmedContent === '{@inheritdoc} ' ) {
@@ -288,7 +289,7 @@ protected function processParams(File $phpcsFile, $stackPtr, $commentStart)
288289
289290 $ tokens = $ phpcsFile ->getTokens ();
290291
291- if ($ this ->skipIfInheritdoc ) {
292+ if ($ this ->skipIfInheritdoc === true ) {
292293 for ($ i = $ commentStart ; $ i <= $ tokens [$ commentStart ]['comment_closer ' ]; $ i ++) {
293294 $ trimmedContent = strtolower (trim ($ tokens [$ i ]['content ' ]));
294295 if ($ trimmedContent === '{@inheritdoc} ' ) {
0 commit comments