-
-
Notifications
You must be signed in to change notification settings - Fork 138
Open
Description
**Prettier 3.8.1 (lastest) **
PHP Plugin 0.24.0
# Options (if any):
--php-version 8.3
--single-quoteInput:
// TRUE
echo (match ('option1') {
'option1' => fn() => 'First',
'option2' => fn() => 'Second',
})();
// code snippet
$x = new Foo; // True style
$y = new Foo(1); // True style
$z = (new Foo)->value; // True styleOutput:
// ERROR
echo match ('option1') {
'option1' => fn() => 'First',
'option2' => fn() => 'Second',
}();
$x = new Foo(); // False sytle: I don't want add ()
$y = new Foo(1); // True style
$z = (new Foo())->value; // False style: I don't want add ()Expected behavior:
I dont want add unnecessary parenthesis
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels