Describe the bug
When a function has a return type and an additional new line between the brace and function signature, phpcbf will remove the return type.
Code sample
<?php
class FormattingBug
{
public function extraLine(string: $a): void
{
// code here.
}
}
To reproduce
Steps to reproduce the behavior:
- Create a file called
test.php with the code sample above...
- Run
phpcbf --standard=PSR12 test.php
phpcbf will update the problematic formatting, however the resulting code looks like:
<?php
class FormattingBug
{
public function extraLine(string: $a)
{
// code here.
}
}
Expected behavior
Formatting to be updated without removing the return type.