Fork me on GitHub
a Sensio Labs Product

Space Sets (v3.64.0) edition

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.

--- 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:

References

The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.