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

Proper enum cases casing #93

Open
krzysztofrewak opened this issue Jun 2, 2023 · 0 comments
Open

Proper enum cases casing #93

krzysztofrewak opened this issue Jun 2, 2023 · 0 comments
Labels
discussion Let's talk new rule New rules for ECS

Comments

@krzysztofrewak
Copy link
Member

I would like to enforce PER coding style for enum cases: https://www.php-fig.org/per/coding-style/#9-enumerations

Before:

enum Status: string
{
    case ACTIVE = "active";
    case INACTIVE = "inactive";
    case SUSPENDED = "suspended";
}

Expected:

enum Status: string
{
    case Active = "active";
    case Inactive = "inactive";
    case Suspended = "suspended";
}

Tricky part: what about acronyms?

@krzysztofrewak krzysztofrewak added new rule New rules for ECS discussion Let's talk labels Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Let's talk new rule New rules for ECS
Projects
None yet
Development

No branches or pull requests

1 participant