Skip to content

Commit 1fce753

Browse files
committed
add fixture with multiarsg
1 parent e3fd555 commit 1fce753

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
3+
namespace Rector\PHPUnit\Tests\CodeQuality\Rector\MethodCall\ScalarArgumentToExpectedParamTypeRector\Fixture;
4+
5+
use PHPUnit\Framework\TestCase;
6+
use Rector\PHPUnit\Tests\CodeQuality\Rector\MethodCall\ScalarArgumentToExpectedParamTypeRector\Source\SomeClassWithSetter;
7+
8+
final class MultipleArgs extends TestCase
9+
{
10+
public function test()
11+
{
12+
$someClassWithSetter = new SomeClassWithSetter();
13+
$someClassWithSetter->setItems('1', 2, 3, 4);
14+
}
15+
}
16+
17+
?>
18+
-----
19+
<?php
20+
21+
namespace Rector\PHPUnit\Tests\CodeQuality\Rector\MethodCall\ScalarArgumentToExpectedParamTypeRector\Fixture;
22+
23+
use PHPUnit\Framework\TestCase;
24+
use Rector\PHPUnit\Tests\CodeQuality\Rector\MethodCall\ScalarArgumentToExpectedParamTypeRector\Source\SomeClassWithSetter;
25+
26+
final class MultipleArgs extends TestCase
27+
{
28+
public function test()
29+
{
30+
$someClassWithSetter = new SomeClassWithSetter();
31+
$someClassWithSetter->setItems('1', 2, '3', 4);
32+
}
33+
}
34+
35+
?>

rules-tests/CodeQuality/Rector/MethodCall/ScalarArgumentToExpectedParamTypeRector/Source/SomeClassWithSetter.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,9 @@ public function setUnionType(int|string $unionValue)
2222
{
2323

2424
}
25+
26+
public function setItems(string $one, int $two, string $three, int $four)
27+
{
28+
29+
}
2530
}

0 commit comments

Comments
 (0)