**Prettier 3.8.1 (lastest) **
PHP Plugin 0.24.0
# Options (if any):
--php-version 8.3
--single-quote
Input:
// 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 style
Output:
// 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
**Prettier 3.8.1 (lastest) **
PHP Plugin 0.24.0
# Options (if any): --php-version 8.3 --single-quoteInput:
Output:
Expected behavior:
I dont want add unnecessary parenthesis