prettier / plugin-php

Prettier PHP Plugin

Home Page:https://loilo.github.io/prettier-php-playground/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Class and method braces with no body split onto multiple lines

hackel opened this issue · comments

@prettier/plugin-php v0.21.0
Playground link

Input:

<?php

class CustomException extends \RuntimeException {}

class AnotherClass {
    public function __construct(public int $x, public int $y) {}
}

Output:

<?php

class CustomException extends \RuntimeException
{
}

class AnotherClass
{
    public function __construct(public int $x, public int $y)
    {
    }
}

Expected behavior:
The closed braces {} should remain inline, as per PER CS 2.0.