.. _structures-multilineexpressions: .. _multiline-expressions: Multiline Expressions +++++++++++++++++++++ List of expressions that are spread across several lines. The default is 2. Structures that commonly accept several lines, like `match() `_, `switch() `_, classes, functions, closures, constant definitions, etc. are omitted. Multiline expressions, like complex expressions, tend to be less readable. Although, some multiline expressions are written to make them more readable, compared to a one-line complex expression. .. code-block:: php +------+---------+---------+-----------------------------------------------------+ | Name | Default | Type | Description | +------+---------+---------+-----------------------------------------------------+ | min | 2 | integer | Minimal number of lines in an expression to report. | +------+---------+---------+-----------------------------------------------------+ Suggestions ___________ * Reduce the size of the expression by moving it to a method * Reduce the size of the expression by splitting it into several ones Specs _____ +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Short name | Structures/MultilineExpressions | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Rulesets | :ref:`All `, :ref:`Changed Behavior `, :ref:`Suggestions ` | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Exakat since | 2.6.1 | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | PHP Version | All | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Severity | Minor | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Time To Fix | Quick (30 mins) | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Precision | High | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Related rule | :ref:`too-complex-expression` | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Available in | `Entreprise Edition `_, `Exakat Cloud `_ | +--------------+-------------------------------------------------------------------------------------------------------------------------+