driade / phpfmt8

PHP formatter for Sublime Text 4, with PHP 8 support.
BSD 3-Clause "New" or "Revised" License
46 stars 2 forks source link

Problem with null as variable type #36

Closed driade closed 1 year ago

driade commented 1 year ago
<?php

class B
{
    public int|string $a;
    public null|string $b;
    public ?|string $b;
    public null|\stdClass $b;
}

becomes

<?php

class B
{
    public int|string $a;
    public null|string $b;
    ?public |string $b;
    \stdClasspublic null| $b;
}
driade commented 1 year ago

It was related to the namespaces in fact