============================== Rule ``method_argument_space`` ============================== In method arguments and method call, there MUST NOT be a space before each comma and there MUST be one space after each comma. Argument lists MAY be split across multiple lines, where each subsequent line is indented once. When doing so, the first item in the list MUST be on the next line, and there MUST be only one argument per line. Description ----------- This fixer covers rules defined in PSR2 ¶4.4, ¶4.6. Configuration ------------- ``keep_multiple_spaces_after_comma`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Whether keep multiple spaces after comma. Allowed types: ``bool`` Default value: ``false`` ``on_multiline`` ~~~~~~~~~~~~~~~~ Defines how to handle function arguments lists that contain newlines. Allowed values: ``'ensure_fully_multiline'``, ``'ensure_single_line'`` and ``'ignore'`` Default value: ``'ensure_fully_multiline'`` ``after_heredoc`` ~~~~~~~~~~~~~~~~~ Whether the whitespace between heredoc end and comma should be removed. Allowed types: ``bool`` Default value: ``false`` Examples -------- Example #1 ~~~~~~~~~~ *Default* configuration. .. code-block:: diff --- Original +++ New false]``. .. code-block:: diff --- Original +++ New true]``. .. code-block:: diff --- Original +++ New 'ensure_fully_multiline']``. .. code-block:: diff --- Original +++ New 'ensure_single_line']``. .. code-block:: diff --- Original +++ New 'ensure_fully_multiline', 'keep_multiple_spaces_after_comma' => true]``. .. code-block:: diff --- Original +++ New 'ensure_fully_multiline', 'keep_multiple_spaces_after_comma' => false]``. .. code-block:: diff --- Original +++ New true]``. .. code-block:: diff --- Original +++ New `_ with config: ``['on_multiline' => 'ensure_fully_multiline']`` - `@PER-CS1.0 <./../../ruleSets/PER-CS1.0.rst>`_ with config: ``['on_multiline' => 'ensure_fully_multiline']`` - `@PER-CS2.0 <./../../ruleSets/PER-CS2.0.rst>`_ with config: ``['on_multiline' => 'ensure_fully_multiline']`` - `@PHP73Migration <./../../ruleSets/PHP73Migration.rst>`_ with config: ``['after_heredoc' => true]`` - `@PHP74Migration <./../../ruleSets/PHP74Migration.rst>`_ with config: ``['after_heredoc' => true]`` - `@PHP80Migration <./../../ruleSets/PHP80Migration.rst>`_ with config: ``['after_heredoc' => true]`` - `@PHP81Migration <./../../ruleSets/PHP81Migration.rst>`_ with config: ``['after_heredoc' => true]`` - `@PHP82Migration <./../../ruleSets/PHP82Migration.rst>`_ with config: ``['after_heredoc' => true]`` - `@PSR2 <./../../ruleSets/PSR2.rst>`_ with config: ``['on_multiline' => 'ensure_fully_multiline']`` - `@PSR12 <./../../ruleSets/PSR12.rst>`_ with config: ``['on_multiline' => 'ensure_fully_multiline']`` - `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_ with config: ``['on_multiline' => 'ensure_fully_multiline']`` - `@Symfony <./../../ruleSets/Symfony.rst>`_ with config: ``['on_multiline' => 'ignore']``