There should not be useless concat operations.
Allow for simple string quote juggling if it results in more concat-operations merges.
Allowed types: bool
Default value: false
Default configuration.
--- Original
+++ New
<?php
-$a = 'a'.'b';
+$a = 'ab';
With configuration: ['juggle_simple_strings' => true]
.
--- Original
+++ New
<?php
-$a = 'a'."b";
+$a = "ab";
The rule is part of the following rule sets:
- Fixer class: PhpCsFixer\Fixer\Operator\NoUselessConcatOperatorFixer
- Test class: PhpCsFixer\Tests\Fixer\Operator\NoUselessConcatOperatorFixerTest
The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.