Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added new sniff Generic.PHP.DeclareStrictTypes #1771

4 changes: 2 additions & 2 deletions src/Standards/Generic/Sniffs/PHP/DeclareStrictTypesSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ public function process(File $phpcsFile, $stackPtr)

$this->checkOtherDeclarations($phpcsFile, $next);

return (count($tokens) + 1);
return $phpcsFile->numTokens;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I remember correctly, elsewhere return ($phpcsFile->numTokens + 1) is used. Shouldn't really make a difference, but just thought I'd mention it for consistency sake.

}//end if
}//end if

Expand All @@ -323,7 +323,7 @@ public function process(File $phpcsFile, $stackPtr)
$phpcsFile->fixer->addContent($stackPtr, $this->format.$phpcsFile->eolChar);
}

return (count($tokens) + 1);
return $phpcsFile->numTokens;

}//end process()

Expand Down