Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formating of "match" expression same as arrays in PHP #7191

Closed
Eugene-Melbourne opened this issue Mar 25, 2024 · 3 comments
Closed

Formating of "match" expression same as arrays in PHP #7191

Eugene-Melbourne opened this issue Mar 25, 2024 · 3 comments
Labels
can not reproduce PHP [ci] enable extra PHP tests (php/php.editor)

Comments

@Eugene-Melbourne
Copy link

Apache NetBeans version

Apache NetBeans 21

What happened

when you formatting PHP code, the match expression is being formatted without columns support

Language / Project Type / NetBeans Component

No response

How to reproduce

alt + shift + f - is making a formatting

this is the actual formatting

match ($type) {
    'integer' => 'a',
    'string' => 'b',
    default => null,
};

this is the expected formatting

match ($type) {
    'integer' => 'a',
    'string'  => 'b',
    default   => null,
};

Did this work correctly in an earlier version?

No / Don't know

Operating System

Windows 10 version 10.0 running on amd64; UTF-8; en_AU (nb)

JDK

19.0.2; Java HotSpot(TM) 64-Bit Server VM 19.0.2+7-44

Apache NetBeans packaging

Apache NetBeans provided installer

Anything else

I know it may sound like a feature request, but as a feature it was already implemented in the ticket
#6074

but the formatting is still not being fixed, so I suspect it is a bug this time.

Are you willing to submit a pull request?

No

@Eugene-Melbourne Eugene-Melbourne added kind:bug Bug report or fix needs:triage Requires attention from one of the committers labels Mar 25, 2024
@troizet troizet added the PHP [ci] enable extra PHP tests (php/php.editor) label Mar 26, 2024
@junichi11
Copy link
Member

Did you check formatting options?

image

@junichi11 junichi11 added can not reproduce and removed kind:bug Bug report or fix needs:triage Requires attention from one of the committers labels May 31, 2024
@junichi11
Copy link
Member

I can't reproduce it with NB22. If it does not work fine, please feel free to reopen this with your exact steps to reproduce it.

@Eugene-Melbourne
Copy link
Author

Alignment > Group Multiline Alignment >Match Arm Arrow is working for me. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
can not reproduce PHP [ci] enable extra PHP tests (php/php.editor)
Projects
None yet
Development

No branches or pull requests

3 participants