12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- =====================
- Rule ``concat_space``
- =====================
- Concatenation should be spaced according to configuration.
- Configuration
- -------------
- ``spacing``
- ~~~~~~~~~~~
- Spacing to apply around concatenation operator.
- Allowed values: ``'none'`` and ``'one'``
- Default value: ``'none'``
- Examples
- --------
- Example #1
- ~~~~~~~~~~
- *Default* configuration.
- .. code-block:: diff
- --- Original
- +++ New
- <?php
- -$foo = 'bar' . 3 . 'baz'.'qux';
- +$foo = 'bar'. 3 .'baz'.'qux';
- Example #2
- ~~~~~~~~~~
- With configuration: ``['spacing' => 'none']``.
- .. code-block:: diff
- --- Original
- +++ New
- <?php
- -$foo = 'bar' . 3 . 'baz'.'qux';
- +$foo = 'bar'. 3 .'baz'.'qux';
- Example #3
- ~~~~~~~~~~
- With configuration: ``['spacing' => 'one']``.
- .. code-block:: diff
- --- Original
- +++ New
- <?php
- -$foo = 'bar' . 3 . 'baz'.'qux';
- +$foo = 'bar' . 3 . 'baz' . 'qux';
- Rule sets
- ---------
- The rule is part of the following rule sets:
- - `@PER <./../../ruleSets/PER.rst>`_ with config:
- ``['spacing' => 'one']``
- - `@PER-CS2.0 <./../../ruleSets/PER-CS2.0.rst>`_ with config:
- ``['spacing' => 'one']``
- - `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_
- - `@Symfony <./../../ruleSets/Symfony.rst>`_
|