doc/rules/operator/no_useless_concat_operator.rst
no_useless_concat_operatorThere should not be useless concat operations.
This rule is CONFIGURABLE
You can configure this rule using the following option:
``juggle_simple_strings``.
Configuration
-------------
``juggle_simple_strings``
Allow for simple string quote juggling if it results in more concat-operations merges.
Allowed types: bool
Default value: false
Example #1
*Default* configuration.
.. code-block:: diff
--- Original
+++ New
<?php
-$a = 'a'.'b';
+$a = 'ab';
Example #2
With configuration: ['juggle_simple_strings' => true].
.. code-block:: diff
--- Original +++ New <?php -$a = 'a'."b"; +$a = "ab";
The rule is part of the following rule sets:
@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>_@Symfony <./../../ruleSets/Symfony.rst>_PhpCsFixer\\Fixer\\Operator\\NoUselessConcatOperatorFixer <./../../../src/Fixer/Operator/NoUselessConcatOperatorFixer.php>_PhpCsFixer\\Tests\\Fixer\\Operator\\NoUselessConcatOperatorFixerTest <./../../../tests/Fixer/Operator/NoUselessConcatOperatorFixerTest.php>_The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.