Skip to content

Commit 1ab2284

Browse files
authored
OperatorLinebreakFixer - support concatenation operator (#80)
1 parent dab69e0 commit 1ab2284

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## [Unreleased]
44
- Update PHP CS Fixer to v2.14
55
- OperatorLinebreakFixer - respect no whitespace around operator
6+
- OperatorLinebreakFixer - support concatenation operator
67
- Deprecate PhpdocVarAnnotationCorrectOrderFixer
78

89
## v1.12.0 - *2018-12-02*

src/Fixer/OperatorLinebreakFixer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ final class OperatorLinebreakFixer extends AbstractFixer implements Configuratio
2525

2626
private const NON_BOOLEAN_OPERATORS = [
2727
'=' => true,
28+
'.' => true,
2829
'*' => true,
2930
'/' => true,
3031
'%' => true,

tests/Fixer/OperatorLinebreakFixerTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,17 @@ public function provideFixCases(): \Generator
7575
',
7676
];
7777

78+
yield [
79+
'<?php
80+
return $foo
81+
.$bar;
82+
',
83+
'<?php
84+
return $foo.
85+
$bar;
86+
',
87+
];
88+
7889
yield [
7990
'<?php
8091
return $foo +

0 commit comments

Comments
 (0)