-
Notifications
You must be signed in to change notification settings - Fork 17
Add support for enum methods #289
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
Conversation
🤔 This will need a way to identify enum scopes without T_ENUM in order to work prior to PHP 7.3 (enums were introduced in PHP 8 but it appears that T_ENUM works in 7.3 🤷 ). |
🤔 Ah, it may be something to do with how php or phpcs is installed... |
I figured out how to reproduce the bug! I have to explicitly downgrade phpcs to 3.5.6. I think the issue is that in that version of phpcs, the |
PHPCS 3.5.6 was released in August 2020, way before the idea of Enums ever made it into a PHP RFC, Support for enums was added in PHPCS 3.7.0. |
💥 Fixed. I've disabled code coverage for now until it can be fixed but that's outside the scope of this PR. |
Hang on, I actually have a commit ready to fix that code coverage for you. Give me a moment to send you a PR. |
This adds support for
enum
methods to behave likeclass
methods.Fixes #288