Support for aligning ENUM backed values?
已回答
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?
请先登录再写评论。
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.
That's great to hear! Thank you
You're welcome!