-
-
Notifications
You must be signed in to change notification settings - Fork 437
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
PHP-CS-Fixer: ordered class elements #4483
Conversation
Quality Gate failedFailed conditions |
Even if I was the inspiration for this PR, I'm not sure how I feel about it. Often times method are grouped together by their role, and this would make it harder to read the code just so we can have another rule to be applied. Also to be clear, the other PR I made I didn't reorder the methods to be in alphabetical order, but instead regrouped them so they logically made sense. This PR would undo that effort. |
Description (*)
I'd relly like to make progress on #4411, but @justinbeaty made a change that makes reviews bit complicated.
Methods got re-ordered by its names .
I really like that!
When adding methods/properties i often ask myself where to put it ...
Easy solution ... automate it.
This PR adds https://cs.symfony.com/doc/rules/class_notation/ordered_class_elements.html.
Note
It moves underscore-prefixed methods like "_construct" (single underscore) to the bottom ... deal with it :)