.. _structures-multiplesimilarcalls: .. _multiple-similar-calls: Multiple Similar Calls ++++++++++++++++++++++ Several calls are made to functions or methods in a row. They may have different arguments, though having a lot of similar calls in a row may indicate that a loop is needed. Alternatively, some native PHP functions use an arbitrary number of arguments to avoid multiple calls to the same function. For example, it is possible to call `array_merge() `_ once, or a loop on `.=` may be replaced with a call to `implode() `_. .. code-block:: php Suggestions ___________ * Move the calls to a loop * Tactically use one call to a function with multiple arguments. For example, isset() with multiple arguments. Specs _____ +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Short name | Structures/MultipleSimilarCalls | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Rulesets | :ref:`All `, :ref:`Changed Behavior `, :ref:`Suggestions ` | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Exakat since | 2.3.5 | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | PHP Version | All | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Severity | Minor | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Time To Fix | Quick (30 mins) | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Precision | Very high | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Available in | `Entreprise Edition `_, `Exakat Cloud `_ | +--------------+-------------------------------------------------------------------------------------------------------------------------+