.. _structures-identicalcase: .. _identical-case-in-switch: Identical Case In Switch ++++++++++++++++++++++++ In a `switch() `_ or `match() `_ statement, when there are identical cases, it means that multiple case labels that have the same code block. This can happen by mistake or design. They may be merged together. .. code-block:: php Connex PHP features ------------------- + `dry `_ Suggestions ___________ * Merge the cases and reduce the size of code * Review the cases code and make them different Specs _____ +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Short name | Structures/IdenticalCase | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Rulesets | :ref:`All `, :ref:`Analyze `, :ref:`Changed Behavior ` | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Exakat since | 2.5.3 | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | PHP Version | All | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Severity | Minor | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Time To Fix | Quick (30 mins) | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Precision | High | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Available in | `Entreprise Edition `_, `Exakat Cloud `_ | +--------------+-------------------------------------------------------------------------------------------------------------------------+