.. _functions-uselessdefault: .. _useless-default-argument: Useless Default Argument ++++++++++++++++++++++++ One of the argument has a default value, and this default value is never used. Every time the method is called, the argument is provided explicitly, rendering the default value actually useless. .. code-block:: php Connex PHP features ------------------- + `function `_ + `default `_ Suggestions ___________ * Remove the default value * Remove the explicit argument in the function call, when it is equal to the default value Specs _____ +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Short name | Functions/UselessDefault | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Rulesets | :ref:`All `, :ref:`Changed Behavior `, :ref:`Suggestions ` | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Exakat since | 1.7.9 | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | PHP Version | All | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Severity | Minor | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Time To Fix | Quick (30 mins) | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Precision | High | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Available in | `Entreprise Edition `_, `Exakat Cloud `_ | +--------------+-------------------------------------------------------------------------------------------------------------------------+