Skip to content

Commit fb734e2

Browse files
committed
fix fixture autoload by using unique function names
1 parent 67d2b14 commit fb734e2

File tree

5 files changed

+9
-27
lines changed

5 files changed

+9
-27
lines changed

rules-tests/CodeQuality/Rector/FuncCall/SortNamedParamRector/Fixture/skip_first_class_callable.php.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
namespace Rector\Tests\CodeQuality\Rector\FuncCall\SortNamedParamRector\Fixture;
44

5-
function run($foo = null, $bar = null, $baz = null) {}
5+
function skip_first_class_callable($foo = null, $bar = null, $baz = null) {}
66

7-
run(...);
7+
skip_first_class_callable(...);
88

99
?>

rules-tests/CodeQuality/Rector/FuncCall/SortNamedParamRector/Fixture/skip_no_arg.php.inc

Lines changed: 0 additions & 9 deletions
This file was deleted.

rules-tests/CodeQuality/Rector/FuncCall/SortNamedParamRector/Fixture/skip_single_arg.php.inc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
namespace Rector\Tests\CodeQuality\Rector\FuncCall\SortNamedParamRector\Fixture;
44

5-
function run(?string $foo = null) {}
5+
function skip_single_arg(?string $foo = null) {}
66

7-
run(foo: 'test');
8-
9-
?>
7+
skip_single_arg(foo: 'test');
8+
skip_single_arg();

rules-tests/CodeQuality/Rector/FuncCall/SortNamedParamRector/Fixture/skip_sorted.php.inc

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22

33
namespace Rector\Tests\CodeQuality\Rector\FuncCall\SortNamedParamRector\Fixture;
44

5-
function run($foo = null, $bar = null, $baz = null) {}
5+
function skip_sorted($foo = null, $bar = null, $baz = null) {}
66

7-
run(foo: $foo, bar: $bar);
7+
skip_sorted(foo: $foo, bar: $bar);
88

9-
run($foo, bar: $bar, baz: $baz);
10-
11-
?>
9+
skip_sorted($foo, bar: $bar, baz: $baz);

rules/Transform/Rector/ArrayDimFetch/ArrayDimFetchToMethodCallRector.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,7 @@ public function refactor(Node $node): array|Expr|null|int
8787
if (! $node->var instanceof ArrayDimFetch) {
8888
return null;
8989
}
90-
91-
$setMethodCall = $this->createExplicitMethodCall($node->var, 'set', $node->expr);
92-
if ($setMethodCall instanceof MethodCall) {
93-
return $setMethodCall;
94-
}
95-
96-
return null;
90+
return $this->createExplicitMethodCall($node->var, 'set', $node->expr);
9791
}
9892

9993
// is part of assign, skip

0 commit comments

Comments
 (0)