File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -446,8 +446,14 @@ public function tokenizeString($string, $eolChar='\n')
446
446
&& $ tokens [($ stackPtr + 1 )] === ': '
447
447
&& $ tokens [($ stackPtr - 1 )][0 ] !== T_PAAMAYIM_NEKUDOTAYIM
448
448
) {
449
+ $ stopTokens = array (
450
+ T_CASE ,
451
+ T_SEMICOLON ,
452
+ T_OPEN_CURLY_BRACKET ,
453
+ );
454
+
449
455
for ($ x = ($ newStackPtr - 2 ); $ x > 0 ; $ x --) {
450
- if (in_array ($ finalTokens [$ x ]['code ' ], PHP_CodeSniffer_Tokens:: $ emptyTokens ) === false ) {
456
+ if (in_array ($ finalTokens [$ x ]['code ' ], $ stopTokens ) === true ) {
451
457
break ;
452
458
}
453
459
}
Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
61
61
- Squiz CSS sniffs no longer generate errors for IE filters
62
62
- Squiz LogicalOperatorSpacingSniff now ignores whitespace at the end of a line
63
63
- The PSR2 standard no longer throws errors for additional spacing after a type hint
64
+ - Fixed cases where code was incorrectly assigned the T_GOTO_LABEL token when used in a complex CASE condition
64
65
- Fixed bug #20026 : Check for multi-line arrays that should be single-line is slightly wrong
65
66
-- Adds new error message for single-line arrays that end with a comma
66
67
- Fixed bug #20029 : ForbiddenFunction sniff incorrectly recognizes methods in USE clauses
You can’t perform that action at this time.
0 commit comments