Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #4084 MethodChainingIndentation - fix priority with Braces (dmvdb…
…rugge) This PR was merged into the 2.12 branch. Discussion ---------- MethodChainingIndentation - fix priority with Braces Fixes #3854 Commits ------- c0358e8 Priority: Braces before MethodChainingIndentation
- Loading branch information
Showing
3 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
tests/Fixtures/Integration/priority/braces,method_chaining_indentation.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--TEST-- | ||
Integration of fixers: braces,method_chaining_indentation. | ||
--RULESET-- | ||
{"braces": true, "method_chaining_indentation": true} | ||
--EXPECT-- | ||
<?php | ||
class SomeUnitTest extends PHPUnit\Framework\TestCase | ||
{ | ||
public function testSomething() | ||
{ | ||
// *Only* the next line is indented wrong _before_ fixing | ||
$this->entity | ||
->expects($this->once()) | ||
->method('toXml') | ||
->willReturnCallback( | ||
function (\DOMDocument $dom) { | ||
return $dom->createElement('elem'); | ||
}); | ||
} | ||
} | ||
|
||
--INPUT-- | ||
<?php | ||
class SomeUnitTest extends PHPUnit\Framework\TestCase | ||
{ | ||
public function testSomething() | ||
{ | ||
// *Only* the next line is indented wrong _before_ fixing | ||
$this->entity | ||
->expects($this->once()) | ||
->method('toXml') | ||
->willReturnCallback( | ||
function (\DOMDocument $dom) { | ||
return $dom->createElement('elem'); | ||
}); | ||
} | ||
} |