vscode-phpfmt icon indicating copy to clipboard operation
vscode-phpfmt copied to clipboard

IndentTernaryConditions affects nullable type declarations in multiline function/method parameters

Open metanomial opened this issue 6 months ago • 3 comments

e.g.,

IndentTernaryConditions disabled:

function multiline_parameters(
    string $first,
    ?string $second,
    int $third,
): ?string {
    return $first == $second
    ? $third
    : null;
}

IndentTernaryConditions enabled:

function multiline_parameters(
    string $first,
        ?string $second,
    int $third,
): ?string {
    return $first == $second
        ? $third
        : null;
}

metanomial avatar Jun 12 '25 07:06 metanomial

Thanks, I'll check.

driade avatar Jun 12 '25 07:06 driade

Hi! This should be fixed in the latest release, may you confirm? Thanks in advance.

driade avatar Jun 15 '25 14:06 driade

Working as expected!

metanomial avatar Jun 15 '25 18:06 metanomial