Operators - when multiline - must always be at the beginning or at the end of the line.
whether to limit operators to only boolean ones
Allowed types: bool
Default value: false
whether to place operators at the beginning or at the end of the line
Allowed values: 'beginning'
, 'end'
Default value: 'beginning'
Default configuration.
--- Original
+++ New
<?php
function foo() {
- return $bar ||
- $baz;
+ return $bar
+ || $baz;
}
With configuration: ['position' => 'end']
.
--- Original
+++ New
<?php
function foo() {
- return $bar
- || $baz;
+ return $bar ||
+ $baz;
}
The rule is part of the following rule set:
- @PhpCsFixer
Using the @PhpCsFixer rule set will enable the
operator_linebreak
rule with the config below:['only_booleans' => true]