Skip to content

Commit

Permalink
Fixed bug #19819 : Freeze with syntax error in use statement
Browse files Browse the repository at this point in the history
  • Loading branch information
gsherwood committed Feb 18, 2013
1 parent 69de8fa commit c3dc904
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 32 deletions.
6 changes: 5 additions & 1 deletion CodeSniffer/Standards/PSR1/Sniffs/Files/SideEffectsSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,11 @@ private function _searchForConflict(PHP_CodeSniffer_File $phpcsFile, $start, $en
} else if ($tokens[$i]['code'] === T_USE
|| $tokens[$i]['code'] === T_CONST
) {
$i = $phpcsFile->findNext(T_SEMICOLON, ($i + 1));
$semicolon = $phpcsFile->findNext(T_SEMICOLON, ($i + 1));
if ($semicolon !== false) {
$i = $semicolon;
}

continue;
}

Expand Down
34 changes: 3 additions & 31 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,44 +17,16 @@ http://pear.php.net/dtd/package-2.0.xsd">
<date>2013-02-07</date>
<time>10:10:00</time>
<version>
<release>1.4.4</release>
<api>1.4.4</api>
<release>1.4.5</release>
<api>1.4.5</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt">BSD 3-Clause License</license>
<notes>
- Ignored lines no longer cause the summary report to show incorrect error and warning counts
-- Thanks to Bert Van Hauwaert for the patch
- Added Generic CSSLintSniff to run CSSLint over a CSS file and report warnings
-- Set full command to run CSSLint using phpcs --config-set csslint_path /path/to/csslint
-- Thanks to Roman Levishchenko for the contribution
- Added PSR2 ControlStructureSpacingSniff to ensure there are no spaces before and after parenthesis in control structures
-- Fixes bug #19732 : PSR2: some control structures errors not reported
- Squiz commenting sniffs now support non-English characters when checking for capital letters
-- Thanks to Roman Levishchenko for the patch
- Generic EndFileNewlineSniff now supports JS and CSS files
-- Thanks to Denis Ryabkov for the patch
- PSR1 SideEffectsSniff no longer reports constant declarations as side effects
- Notifysend report now supports notify-send versions before 0.7.3
-- Thanks to Ken Guest for the patch
- PEAR and Squiz FunctionCommentSniffs no longer report errors for misaligned argument comments when they are blank
-- Thanks to Thomas Peterson for the patch
- Squiz FunctionDeclarationArgumentSpacingSniff now works correctly for equalsSpacing values greater than 0
-- Thanks to Klaus Purer for the patch
- Squiz SuperfluousWhitespaceSniff no longer throws errors for CSS files with no newline at the end
- Squiz SuperfluousWhitespaceSniff now allows a single newline at the end of JS and CSS files
- Fixed bug #19755 : Token of T_CLASS type has no scope_opener and scope_closer keys
- Fixed bug #19759 : Squiz.PHP.NonExecutableCode fails for return function()...
- Fixed bug #19763 : Use statements for traits not recognised correctly for PSR2 code style
- Fixed bug #19764 : Instead of for traits throws uppercase constant name errors
- Fixed bug #19772 : PSR2_Sniffs_Namespaces_UseDeclarationSniff does not properly recognize last use
- Fixed bug #19775 : False positive in NonExecutableCode sniff when not using curly braces
- Fixed bug #19782 : Invalid found size functions in loop when using object operator
- Fixed bug #19799 : config folder is not created automatically
- Fixed bug #19804 : JS Tokenizer wrong /**/ parsing
- Fixed bug #19819 : Freeze with syntax error in use statement
</notes>
<contents>
<dir name="/">
Expand Down

0 comments on commit c3dc904

Please sign in to comment.