kokororin / vscode-phpfmt

Integrates phpfmt into VS Code
https://marketplace.visualstudio.com/items?itemName=kokororin.vscode-phpfmt
BSD 3-Clause "New" or "Revised" License
130 stars 30 forks source link

[BUG] Properties whitespace / ordering issue #102

Closed patrickvlt closed 1 year ago

patrickvlt commented 1 year ago

For some reason phpfmt removes whitespace and places the type of my properties before the access modifier:

Before:

<?php

class Foo
{
    private string $title;

    public function __construct(
        string $title
    ) {
        $this->title = $title;
    }
}

After format:

<?php

class Foo
{
    stringprivate $title;

    public function __construct(
        string $title
    ) {
        $this->title = $title;
    }
}

Things I've tried:

  1. Disable all extensions, clear settings in settings.json, only install phpfmt, and try to format.
  2. Tested on W10 and on Ubuntu.