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

fix: replace getKey/getValue methods when enum is a variable #6585

Conversation

carlosvinicius
Copy link
Contributor

The current My C-Labs rule only replaces the methods getKey and getValue if they are called from an enum case. It is currently skipping when an enum is previously assigned to a variable. This PR fixes this missing case.

@carlosvinicius carlosvinicius force-pushed the fix/myclabs-enum-method-calls-in-variables branch 4 times, most recently from e4b99e2 to a15874d Compare December 14, 2024 18:37
@carlosvinicius carlosvinicius force-pushed the fix/myclabs-enum-method-calls-in-variables branch from a15874d to 75f31c2 Compare December 14, 2024 18:39
@samsonasik
Copy link
Member

Thank you @carlosvinicius , let's give it a try 👍

/cc @OskarStark if you have a chance, please try latest dev-main a try, ensure there is no regression for this change and previous @carlosvinicius PR:

as seems you were using it on other issue:

thank you.

@samsonasik samsonasik merged commit 15fcd52 into rectorphp:main Dec 14, 2024
41 checks passed
@OskarStark
Copy link
Contributor

Hi, I moved away from this lab, as all my projects are using native enums now. Thanks for the ping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants