vscode-phpfmt
vscode-phpfmt copied to clipboard
Invalid indent when exclude AddMissingCurlyBraces
I have this phpfmt settings:
"phpfmt.exclude": [
"AddMissingCurlyBraces"
]
And I want to format this code:
if ($a == null)
$a = 1;
Expected result:
if ($a == null)
$a = 1;
Actual result:
if ($a == null)
$a = 1;
The indentation is always on the same level like the if statement.
Thanks, I'll take a look.
Hi again @BergenSoft
There’s no PSR rule that requires the code to be formatted this way. Therefore, enforcing it would introduce a breaking change.
Thanks for your feedback. From my point of view that is a valid bug, because I can have a setting which is causing a wrong indentation. But it is ok for me, I'll look for another formatter. Thank you for your time.