Skip to content

Commit 8a5cffd

Browse files
author
Michael Petri
committed
fixed missing unpack in rector rule
1 parent fb9b817 commit 8a5cffd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/ConsecutiveArgumentsRectorRule.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ public function refactor(Node $node): ?Node
4444
),
4545
new Node\Identifier('of'),
4646
$node->args,
47-
)
47+
),
48+
unpack: true,
4849
)
4950
];
5051

@@ -54,7 +55,7 @@ public function refactor(Node $node): ?Node
5455
public function getRuleDefinition(): RuleDefinition
5556
{
5657
return new RuleDefinition(
57-
'Use $mock->with(ConsecutiveArguments::of(...)) instead of $mock->withConsecutive(...)',
58+
'Use $mock->with(...ConsecutiveArguments::of(...)) instead of $mock->withConsecutive(...)',
5859
[
5960
new CodeSample(
6061
<<<PHP
@@ -72,7 +73,7 @@ public function testExample(): void
7273
->expects(self::exactly(2))
7374
->method('hasAttribute')
7475
->with(
75-
ConsecutiveArguments::of(
76+
...ConsecutiveArguments::of(
7677
['foo'],
7778
['bar']
7879
)

0 commit comments

Comments
 (0)