-
Improvement
-
Resolution: Unresolved
-
Low
-
None
The Moodle Coding Style (MCS) states:
Constants should always be in upper case, and always start with[ Frankenstyle|https://moodledev.io/general/development/policies/codingstyle/frankenstyle] prefix and plugin name (in case of activities the module name only for legacy reasons). They should have words separated by underscores.
There seems to have been a change between PSR-1 and PSR 12
PSR-1 states:
Class constants MUST be declared in all uppercase with underscore separators
PSR-12 states:
Doesn’t make specific mention, however the examples are in lowercase.
Required decision:
Providing we’re correct and it’s PSR 12, should we adopt camel cased constants?
MCS: https://moodledev.io/general/development/policies/codingstyle#constants
PSR-1: https://www.php-fig.org/psr/psr-1/#41-constants
PSR-12: https://www.php-fig.org/psr/psr-12/#43-properties-and-constants