plugin-php
plugin-php copied to clipboard
Class and method braces with no body split onto multiple lines
@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.