Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'whitespace-comments-bugfix' of https://github.com/erikw…

  • Loading branch information...
commit f93ca066ea7aff9bc4e4854837e834d89e14f2c2 2 parents b63ca2e + 0e27956
@gsherwood gsherwood authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 CodeSniffer/Standards/AbstractPatternSniff.php
View
4 CodeSniffer/Standards/AbstractPatternSniff.php
@@ -409,7 +409,9 @@ protected function processPattern(
// This may just be an indent that comes after a newline
// so check the token before to make sure. If it is a newline, we
// can ignore the error here.
- if ($tokens[($stackPtr - 1)]['content'] !== $phpcsFile->eolChar) {
+ if (($tokens[($stackPtr - 1)]['content'] !== $phpcsFile->eolChar)
+ && ($this->ignoreComments === true && in_array($tokens[($stackPtr - 1)]['code'], PHP_CodeSniffer_Tokens::$commentTokens) === false)
+ ) {
$hasError = true;
} else {
$stackPtr--;
Please sign in to comment.
Something went wrong with that request. Please try again.