.. _classes-implementisforinterface: .. _implements-is-for-interface: Implements Is For Interface +++++++++++++++++++++++++++ With class heritage, implements should be used for interfaces, and extends with classes. PHP defers the implements check until execution : the code in example does lint, but won,t run. .. code-block:: php Suggestions ___________ * Create an interface from the class, and use it with the implements keyword Specs _____ +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Short name | Classes/ImplementIsForInterface | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Rulesets | :ref:`All `, :ref:`Analyze ` | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Exakat since | 0.8.4 | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | PHP Version | All | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Severity | Minor | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Time To Fix | Quick (30 mins) | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Precision | High | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Features | implements, interface | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Available in | `Entreprise Edition `_, `Exakat Cloud `_ | +--------------+-------------------------------------------------------------------------------------------------------------------------+