You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2022/12/12 20:35:32 UTC

[GitHub] [netbeans] the-liquid-metal opened a new issue, #5096: [PHP] Relaxing constant hint rule for enum

the-liquid-metal opened a new issue, #5096:
URL: https://github.com/apache/netbeans/issues/5096

   ### Description
   
   Enum are conceptually expansion of class with constant. Since PHP enum can have constant, and enum case name witten in StudlyCaps are common practice, it is necessary to adjust the writing style of enum constant like enum case.
   
   At the moment, forcing class constant to be all uppercase is considered too strict for enum use case. We need a little relaxing rule for enum. There are options for this issue:
   - implicitly ignoring the rule just for enum
   - add new option which can be applied by user manually
   
   ### Use case/motivation
   
   ```php
   <?php
   // current rule
   enum Size {
     case Small;
     case Medium;
     case Large;
     public const HUGE = self::Large;
   }
   
   // desirable rule
   enum Size {
     case Small;
     case Medium;
     case Large;
     public const Huge = self::Large;
   }
   
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   No
   
   ### Code of Conduct
   
   Yes


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists