.. _enums-duplicatecasevalue: .. _duplicate-enum-case-value: Duplicate Enum Case Value +++++++++++++++++++++++++ In a backed enumeration, may it be ``int`` or ``string``, the values of the cases must all be distinct. There can't be two of them of the same value. .. code-block:: php Related PHP errors ------------------- + `Duplicate value in enum %s for cases %s and %s `_ Connex PHP features ------------------- + `enum `_ + `enum-case `_ Specs _____ +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Short name | Enums/DuplicateCaseValue | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Rulesets | :ref:`All `, :ref:`Analyze `, :ref:`LintButWontExec ` | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Exakat since | 2.6.8 | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | PHP Version | With PHP 8.1 and more recent | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Severity | Minor | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Time To Fix | Quick (30 mins) | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Precision | Very high | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Note | This issue may lint but will not run | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Available in | `Entreprise Edition `_, `Exakat Cloud `_ | +--------------+-------------------------------------------------------------------------------------------------------------------------+