.. _traits-methodcollisiontraits: .. _method-collision-traits: Method Collision Traits +++++++++++++++++++++++ Two or more traits are included in the same class, and they have methods collisions. Those collisions should be solved with a ``use`` expression. When they are not, PHP stops execution with a fatal `error `_ : ``Trait method M has not been applied, because there are collisions with other trait methods on C``. The code shown lints, but doesn't execute. .. code-block:: php See also `Traits `_. Related PHP errors ------------------- + `0 `_ Connex PHP features ------------------- + `method `_ + `trait `_ + `method-collision `_ Specs _____ +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Short name | Traits/MethodCollisionTraits | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Rulesets | :ref:`All `, :ref:`Analyze `, :ref:`Changed Behavior `, :ref:`LintButWontExec ` | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Exakat since | 1.4.2 | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | PHP Version | All | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Severity | Critical | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Time To Fix | Quick (30 mins) | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Precision | High | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Note | This issue may lint but will not run | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Available in | `Entreprise Edition `_, `Exakat Cloud `_ | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+