You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Squiz ruleset has included BOTH Generic.NamingConventions.UpperCaseConstantName and Generic.PHP.LowerCaseConstant, which contradict each other. The former stipulates that true, false and null constants must always be uppercase, while the latter says that they must always be lowercase.
Which one should be followed, and why are both in the Squiz ruleset?
@tonebender Closing as invalid. Generic.NamingConventions.UpperCaseConstantName is about the declaration case for user-defined constants. There is no conflict between these rules.
Describe the bug
The Squiz ruleset has included BOTH Generic.NamingConventions.UpperCaseConstantName and Generic.PHP.LowerCaseConstant, which contradict each other. The former stipulates that true, false and null constants must always be uppercase, while the latter says that they must always be lowercase.
Which one should be followed, and why are both in the Squiz ruleset?
Code sample
From Squiz/ruleset.xml:
<rule ref="Generic.NamingConventions.UpperCaseConstantName"/> <rule ref="Generic.PHP.LowerCaseConstant"/>
Versions (please complete the following information)
Additional context
Add any other context about the problem here.
Please confirm
master
branch of PHP_CodeSniffer.The text was updated successfully, but these errors were encountered: