-
Notifications
You must be signed in to change notification settings - Fork 56
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
Camel case vars #128
Camel case vars #128
Conversation
Should the drop of PHP 7.1 put into another PR instead if this one? Or was this necessary to be able to introduce the new rule? |
This can now be rebased atop new |
This was necessary for CI to pass as it was not merged at the time of opening this PR. Rebasing now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something to note: DBAL, for example, has protected properties with a leading underscore:
FILE: lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php
-------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-------------------------------------------------------------------------------------------------------------------------------------------------------
38 | ERROR | Protected member variable "_conn" must not contain a leading underscore
| | (Squiz.NamingConventions.ValidVariableName.PublicHasUnderscore)
45 | ERROR | Protected member variable "_platform" must not contain a leading underscore
| | (Squiz.NamingConventions.ValidVariableName.PublicHasUnderscore)
-------------------------------------------------------------------------------------------------------------------------------------------------------
changing that might result in a BC, but we can ignore this new rule there, the same way we do with ODM and classes names conventions:
I noticed there was no sniff enabled to force camelCase variable names.
I cannot create issue to ask so I created this PR. Is there a reason for absence of such rule or is this PR actually viable? Eg. methodNames() or ClassNames are required to be camelCased.