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

default value in match doesn't get correctly aligned #19

Closed driade closed 1 year ago

driade commented 1 year ago
$expressionResult = match ($condition) {
    1, 2   => foo(),
default=> baz(),
};

instead of

$expressionResult = match ($condition) {
    1, 2   => foo(),
    default => baz(),
};
driade commented 1 year ago

nested case

$expressionResult = match ($condition) {
    1, 2   => foo(),
    default=> function () {
        match ($condition) {
            1, 2   => foo(),
            default=> 1
        };
    },
};
glauca commented 1 year ago
$expressionResult = match ($condition) {
    1, 2   => foo(),
default=> baz(),
};

instead of

$expressionResult = match ($condition) {
    1, 2   => foo(),
    default => baz(),
};

Have you solved it?

driade commented 1 year ago

@glauca still on it, sorry

driade commented 1 year ago

@glauca there you're ;)

driade commented 1 year ago

my bad, is not

driade commented 1 year ago

Done, it's been harder than I expected