Open dereuromark opened 9 months ago
I saw the following sniffs around enums
<rule ref="SlevomatCodingStandard.Classes.BackedEnumTypeSpacing"/> <rule ref="SlevomatCodingStandard.Classes.EnumCaseSpacing"/>
But I think it would also be a good idea to have the recommended casing for enum cases to be added Refs https://www.php.net/manual/en/language.enumerations.backed.php
See also
enum Suit: string { case Hearts = 'H'; case SOME_SPADES = 'S'; }
should be fixed to
enum Suit: string { case Hearts = 'H'; case SomeSpades = 'S'; }
with a warning as this would probably be not safe to change.
We could also just issue an error instead of fixable error for existing underscored ones.
I saw the following sniffs around enums
But I think it would also be a good idea to have the recommended casing for enum cases to be added Refs https://www.php.net/manual/en/language.enumerations.backed.php
See also
should be fixed to
with a warning as this would probably be not safe to change.
We could also just issue an error instead of fixable error for existing underscored ones.