Skip to content

Commit 86f6cb6

Browse files
committed
add local call fixture
1 parent 73ce281 commit 86f6cb6

File tree

1 file changed

+43
-0
lines changed
  • rules-tests/CodeQuality/Rector/MethodCall/ScalarArgumentToExpectedParamTypeRector/Fixture

1 file changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?php
2+
3+
namespace Rector\PHPUnit\Tests\CodeQuality\Rector\MethodCall\ScalarArgumentToExpectedParamTypeRector\Fixture;
4+
5+
use Behat\Behat\Context\Context;
6+
use Rector\PHPUnit\Tests\CodeQuality\Rector\MethodCall\ScalarArgumentToExpectedParamTypeRector\Source\SomeClassWithSetter;
7+
8+
final class LocalCall implements Context
9+
{
10+
public function test()
11+
{
12+
$result = $this->sumUp('1', '2');
13+
}
14+
15+
private function sumUp(int $a, int $b): int
16+
{
17+
return $a + $b;
18+
}
19+
}
20+
21+
?>
22+
-----
23+
<?php
24+
25+
namespace Rector\PHPUnit\Tests\CodeQuality\Rector\MethodCall\ScalarArgumentToExpectedParamTypeRector\Fixture;
26+
27+
use Behat\Behat\Context\Context;
28+
use Rector\PHPUnit\Tests\CodeQuality\Rector\MethodCall\ScalarArgumentToExpectedParamTypeRector\Source\SomeClassWithSetter;
29+
30+
final class LocalCall implements Context
31+
{
32+
public function test()
33+
{
34+
$result = $this->sumUp(1, 2);
35+
}
36+
37+
private function sumUp(int $a, int $b): int
38+
{
39+
return $a + $b;
40+
}
41+
}
42+
43+
?>

0 commit comments

Comments
 (0)