Open ferhado opened 7 months ago
Hi @ferhado I've checking this issue.
I understand your point, but "automatically place the opening brace on the same line", unless you ask specifically for it, shouldn't be enforced by the tool.
We may talk about creating a rule something like "CurlyOpenSameLine" you could opt in, the contrary of "PSR2CurlyOpenNextLine" which is the one causing the formating under PSR2.
Thanks for the issue and the long explanation.
I am experiencing a formatting inconsistency in the
phpfmt
formatter when thephpfmt.psr2
setting is set to false. Specifically, the formatter does not automatically align the opening braces{
on the same line as the method signature for certain return types, though it maintains the brace position if manually adjusted.Steps to Reproduce
phpfmt.psr2
configuration to false.phpfmt
formatting to a PHP class with methods having different return types.Current Behavior
With
phpfmt.psr2
set to false, the formatter does not automatically place the opening brace on the same line for some method return types:However, if the braces are manually placed on the same line, the formatter does not move them:
Expected Behavior
The formatter should automatically place the opening brace on the same line as the method signature for all methods: