Skip to content

Latest commit

 

History

History
63 lines (42 loc) · 1.29 KB

no_useless_concat_operator.rst

File metadata and controls

63 lines (42 loc) · 1.29 KB

Rule no_useless_concat_operator

There should not be useless concat operations.

Configuration

juggle_simple_strings

Allow for simple string quote juggling if it results in more concat-operations merges.

Allowed types: bool

Default value: false

Examples

Example #1

Default configuration.

--- Original
+++ New
 <?php
-$a = 'a'.'b';
+$a = 'ab';

Example #2

With configuration: ['juggle_simple_strings' => true].

--- Original
+++ New
 <?php
-$a = 'a'."b";
+$a = "ab";

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.