Skip to content
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

bug: Fix various indentation issues #6480

Merged
merged 1 commit into from Jul 15, 2022

Conversation

julienfalque
Copy link
Member

@julienfalque julienfalque commented Jul 13, 2022

Fixes #6478, the remaining case from #6471 (comment) and some cases from #6470.

@coveralls
Copy link

coveralls commented Jul 13, 2022

Coverage Status

Coverage increased (+0.04%) to 92.873% when pulling 50b3550 on julienfalque:fix-indentation into f403e7f on FriendsOfPHP:master.

@julienfalque julienfalque force-pushed the fix-indentation branch 2 times, most recently from 87f81ac to c8659fe Compare July 14, 2022 16:14
yield 'with several opening braces on same line' => [
'<?php
if ($foo) { if ($foo) { foo();
if ($bar) { if ($bar) { bar(); }
baz();
}
}
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixing the tests with anonymous functions added below without breaking this one is super tricky and I could not find a solution yet. Since this is a very odd edge case—unlike the ones being fixed—I think this is an acceptable trade-off.

@keradus
Copy link
Member

keradus commented Jul 15, 2022

kudos!

@keradus keradus merged commit 54d2c6f into PHP-CS-Fixer:master Jul 15, 2022
@julienfalque julienfalque deleted the fix-indentation branch July 15, 2022 21:10
kayw-geek pushed a commit to kayw-geek/PHP-CS-Fixer that referenced this pull request Jul 16, 2022
kayw-geek pushed a commit to kayw-geek/PHP-CS-Fixer that referenced this pull request Jul 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

braces: Incorrect indentation for “if-then” with only a comment
4 participants