-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect Squiz.WhiteSpace.ControlStructureSpacing.NoLineAfterClose error between catch and finally statements #1890
Comments
…NoLineAfterClose error between catch and finally statements Also fixed up a few other sniff that were not checking finally statements
Yes, it should be no error. I also found a couple of other sniffs that were not checking finally blocks, so I've fixed those up as well. Thanks for reporting this. |
You are welcome. Thank you for addressing this issue. |
One question, Will this be backported to 2.9.x? |
I'm not maintaining the 2.9 branch any more, so it wont be backported. But, I still need to tag and release the very final 2.9 version, so if you want to create a PR for this, I'll merge it into 2.9 before I do that. But once that's done, I wont be able to fix any more 2.9 issues and you may need to maintain a fork if you want to backport any more. |
This change (based on bisect) introduces a BC break in 3.2.3 bugfix release. The following code did not produce any error in 3.2.2: <?php
try {
doSomething();
} catch (SomeException $e) {
// ignore
} It is now producing the following error in 3.2.3:
|
The following error was recorded under Squiz.WhiteSpace.ControlStructureSpacing.NoLineAfterClose
The code is a
try/catch/finally
block with a set ofif
control structures inside the catch.link to code section: https://github.com/joomla-framework/console/blob/13a8498930831b88c5ece0327a1c46e331a54fb8/src/Application.php#L390-L466
The error occurs at the
catch
close bracket before thefinally
keywordI believe the Expected result is no error for this code
The text was updated successfully, but these errors were encountered: