-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: LineBreakBetweenMethodArgumentsFixer (#135)
- Loading branch information
1 parent
00fa06b
commit fd2e3d6
Showing
7 changed files
with
119 additions
and
45 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
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
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
61 changes: 61 additions & 0 deletions
61
tests/UseCase/LineBreakBetweenMethods/Regression/Case5.php
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,61 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace tests\UseCase\LineBreakBetweenMethods\Regression; | ||
|
||
use PedroTroller\CS\Fixer\CodingStyle\LineBreakBetweenMethodArgumentsFixer; | ||
use tests\UseCase; | ||
|
||
/** | ||
* https://github.com/PedroTroller/PhpCSFixer-Custom-Fixers/issues/131. | ||
*/ | ||
final class Case5 implements UseCase | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getFixer() | ||
{ | ||
$fixer = new LineBreakBetweenMethodArgumentsFixer(); | ||
|
||
$fixer->configure([ | ||
'max-args' => 4, | ||
'max-length' => 100, | ||
]); | ||
|
||
return $fixer; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getRawScript() | ||
{ | ||
return <<<'PHP' | ||
<?php | ||
return [\dirname(__DIR__) . '/definitions']; | ||
PHP; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getExpectation() | ||
{ | ||
return <<<'PHP' | ||
<?php | ||
return [\dirname(__DIR__) . '/definitions']; | ||
PHP; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getMinSupportedPhpVersion() | ||
{ | ||
return 0; | ||
} | ||
} |