.. _interfaces-alreadyparentsinterface: .. _already-parents-interface: Already Parents Interface +++++++++++++++++++++++++ The same interface is implemented by a class and one of its children. That way, the child doesn't need to implement the interface, nor define its methods to be an instance of the interface. This analysis may report classes which do not explicitly implements any interfaces : the issue is then coming from the parents. .. code-block:: php Connex PHP features ------------------- + `implements `_ + `inheritance `_ Suggestions ___________ * Keep the implements call in the class that do implements the methods. Remove it from the children classes. Specs _____ +--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ | Short name | Interfaces/AlreadyParentsInterface | +--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ | Rulesets | :ref:`All `, :ref:`Analyze `, :ref:`Changed Behavior `, :ref:`Suggestions ` | +--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ | Exakat since | 0.8.4 | +--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ | PHP Version | All | +--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ | Severity | Minor | +--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ | Time To Fix | Instant (5 mins) | +--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ | Precision | Very high | +--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ | Examples | :ref:`case-wordpress-interfaces-alreadyparentsinterface`, :ref:`case-thelia-interfaces-alreadyparentsinterface` | +--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ | Available in | `Entreprise Edition `_, `Exakat Cloud `_ | +--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+