Hi, sorry for the delayed reply. Busy days...
So, I use default formatting options (PSR-12).
About the opening brace. It only goes to the same line if the previous method is an abstract method with multi-line parameter declaration.
My guess for this issue is: In PSR-12, when a method uses multi-line parameter declaration, the opening brace stays in the same line as the closing parenthesis for parameter declaration:
public function m1(
string $p1,
string $p2
): bool {
// my code goes here
}
public function m2(string $p1): bool
{
// my code goes here
}
But, when "m1" method is abstract it has no braces, so the next opening brace is the one from the next method.
I think that, maybe, the formatter algorithm is checking:
if "this method has multiline parameter declaration", then the next opening brace must be in the same line as the closing parenthesis that's before it.
Sorry if I'm not making myself clear.