laravel / pint

Laravel Pint is an opinionated PHP code style fixer for minimalists.

Home Page:https://laravel.com/docs/pint

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add option to configure empty construction braces on same line or new line

tiprecpago opened this issue · comments

It would be nice to have an option to configure where to place the last brace of empty construction methods.

class ClassName
{
    public function __construct(
        public readonly string $name,
    ) {
    }
}

and

class ClassName
{
    public function __construct(
        public readonly string $name,
    ) {}
}

Right now, we don't have any plans for this in Pint itself. Maybe you can build a custom rule?