For instance #797 is also caused by this fixer, which i would not expect. The braces fixer seems to also fix proper indentation for other things, which imo should be a separate fixer
The current PSR2 Indentation fixer could handle this perhaps as well, to not only convert tabs to spaces, but also ensure 4 spaces indentation per level.
MUST USE 4 spaces for indent, defines both to use spaces instead of tabs, also that it must be 4 spaces
The body of each structure MUST be enclosed by braces. Braces should be properly placed. Body of braces should be properly indented.
There were a lot of problems to split BracesFixer into many fixers. Just see numbers of todo and linked issues #472 .
If you want to split it - go ahead! It is a good move for sure.
But idea of splitting BracesFixer and move some of it into other, existing fixers, like indent, is bad IMO.
It may be easier to split if one fixer could make another one as dependency (can't run without it)
Yeh, that could make things easier.
Issue is reported for 2 years. As it's valid, it's not an easy task to do. Closing to clean up the things.
Even after that, if one is feeling ready for the task - feel free to contribute !
I'm reopening because this still causes a lot of bug reports/feature requests related to this.
I've started working on this issue.
Most helpful comment
I've started working on this issue.