Skip to content

Commit

Permalink
Clarify SwapFuncCallArguments rule documentation (#3036)
Browse files Browse the repository at this point in the history
  • Loading branch information
raveren committed Nov 7, 2022
1 parent 5aa4248 commit 4991730
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions rules/Arguments/Rector/FuncCall/SwapFuncCallArgumentsRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,29 +31,29 @@ final class SwapFuncCallArgumentsRector extends AbstractRector implements Config

public function getRuleDefinition(): RuleDefinition
{
return new RuleDefinition('Swap arguments in function calls', [
return new RuleDefinition('Reorder arguments in function calls', [
new ConfiguredCodeSample(
<<<'CODE_SAMPLE'
final class SomeClass
{
public function run($one, $two)
public function run()
{
return some_function($one, $two);
return some_function('one', 'two', 'three');
}
}
CODE_SAMPLE
,
<<<'CODE_SAMPLE'
final class SomeClass
{
public function run($one, $two)
public function run()
{
return some_function($two, $one);
return some_function('three', 'two', 'one');
}
}
CODE_SAMPLE
,
[new SwapFuncCallArguments('some_function', [1, 0])],
[new SwapFuncCallArguments('some_function', [2, 1, 0])],
),
]);
}
Expand Down

0 comments on commit 4991730

Please sign in to comment.