forked from squizlabs/PHP_CodeSniffer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
If an ELSE token is both an opener and closer, but it is followed by …
…an IF, the scope_condition will be unset to allow it to act as an opener, but the condition will never be set again. So added a sanity check for this case.
- Loading branch information
Showing
2 changed files
with
11 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -104,4 +104,8 @@ if ($foo): | |
elseif ($baz): | ||
$foo = 2; | ||
endif; | ||
endif; | ||
|
||
if ($foo): | ||
else if ($baz): $foo = 2; | ||
endif; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters