.. _classes-constantclass: .. _constant-class: Constant Class ++++++++++++++ A class or an interface only made up of constants. Constants usually have to be used in conjunction of some behavior (methods, class...) and never alone. As such, they should be PHP constants (build with define or const), or included in a class with other methods and properties. .. code-block:: php See also `PHP Classes containing only constants `_. Connex PHP features ------------------- + `class-constant `_ Suggestions ___________ * Make the class an interface * Make the class an abstract class, to avoid its instantiation Specs _____ +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Short name | Classes/ConstantClass | +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Rulesets | :ref:`All `, :ref:`CE `, :ref:`Changed Behavior `, :ref:`Class Review ` | +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Exakat since | 0.8.4 | +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | PHP Version | All | +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Severity | Minor | +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Time To Fix | Slow (1 hour) | +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Precision | High | +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Available in | `Entreprise Edition `_, `Community Edition `_, `Exakat Cloud `_ | +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+