Skip to content

Latest commit

 

History

History
70 lines (47 loc) · 1.22 KB

concat_space.rst

File metadata and controls

70 lines (47 loc) · 1.22 KB

Rule concat_space

Concatenation should be spaced according configuration.

Configuration

spacing

Spacing to apply around concatenation operator.

Allowed values: 'none', 'one'

Default value: 'none'

Examples

Example #1

Default configuration.

--- Original
+++ New
 <?php
-$foo = 'bar' . 3 . 'baz'.'qux';
+$foo = 'bar'. 3 .'baz'.'qux';

Example #2

With configuration: ['spacing' => 'none'].

--- Original
+++ New
 <?php
-$foo = 'bar' . 3 . 'baz'.'qux';
+$foo = 'bar'. 3 .'baz'.'qux';

Example #3

With configuration: ['spacing' => 'one'].

--- Original
+++ New
 <?php
-$foo = 'bar' . 3 . 'baz'.'qux';
+$foo = 'bar' . 3 . 'baz' . 'qux';

Rule sets

The rule is part of the following rule sets:

@PhpCsFixer
Using the @PhpCsFixer rule set will enable the concat_space rule with the default config.
@Symfony
Using the @Symfony rule set will enable the concat_space rule with the default config.