Support for aligning ENUM backed values?

Answered

There does not seem to be a way to configure PHPStorm coding style to automatically align ENUM backed values.

Example

enum ExampleEnum: string
{
case VALUE = 'value';
case ANOTHER_VALUE = 'another_value';
}

 

The goal would be to align them just as regular class constant values can be aligned.

For example;

enum ExampleEnum: string
{
case VALUE = 'value';
case ANOTHER_VALUE = 'another_value';
}

Does anyone know of a way to accomplish this?

3 comments
Comment actions Permalink

That's Settings (Preferences on macOS) | Editor | Code Style | PHP | Wrapping and Braces | Class property/constant groups | Align enum cases:

Introduced in the upcoming 2022.3 IDE version.

1
Comment actions Permalink

That's great to hear! Thank you

0

Please sign in to leave a comment.