Skip to content

Commit

Permalink
Changelog for bug squizlabs#985 (fixed by PR squizlabs#1131) + minor …
Browse files Browse the repository at this point in the history
…change to exclude code
  • Loading branch information
gsherwood committed Aug 25, 2016
1 parent 405ab6d commit 447ee98
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,11 @@ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
T_OPEN_TAG,
);

$exclude = array(
T_WHITESPACE,
T_COMMENT,
);

while ($next !== false) {
$prev = $phpcsFile->findPrevious($find, ($next - 1));

// Check if an inner block was closed.
$beforePrev = $phpcsFile->findPrevious($exclude, ($prev - 1), null, true);
$beforePrev = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($prev - 1), null, true);
if ($beforePrev !== false
&& $tokens[$beforePrev]['code'] === T_CLOSE_CURLY_BRACKET
) {
Expand Down
2 changes: 2 additions & 0 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ http://pear.php.net/dtd/package-2.0.xsd">
-- The format of the PHP version is the same as the PHP_VERSION_ID constant (e.g., 50403 for version 5.4.3)
-- Supported sniffs are Generic.PHP.DisallowAlternativePHPTags, PSR1.Classes.ClassDeclaration, Squiz.Commenting.FunctionComment
-- Thanks to Finlay Beaton for the patch
- Fixed bug #985 : Duplicate class definition detection generates false-positives in media queries
-- Thanks to Raphael Horber for the patch
- Fixed bug #1014 : Squiz VariableCommentSniff doesn't always detect a missing comment
- Fixed bug #1066 : Undefined index: quiet in CLI.php during unit test run with -v command line arg
- Fixed bug #1072 : Squiz.SelfMemberReference.NotUsed not detected if leading namespace separator is used
Expand Down

0 comments on commit 447ee98

Please sign in to comment.