Skip to content

Commit c5b8eba

Browse files
authored
Add fixture unique types on ClassMethodArrayDocblockParamFromLocalCallsRector (#7344)
1 parent f5e3662 commit c5b8eba

File tree

1 file changed

+42
-0
lines changed
  • rules-tests/TypeDeclarationDocblocks/Rector/Class_/ClassMethodArrayDocblockParamFromLocalCallsRector/Fixture

1 file changed

+42
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?php
2+
3+
namespace Rector\Tests\TypeDeclarationDocblocks\Rector\Class_\ClassMethodArrayDocblockParamFromLocalCallsRector\Fixture;
4+
5+
class UniqueTypes
6+
{
7+
public function go()
8+
{
9+
$this->run(['item1', 'item2']);
10+
$this->run([1, 2]);
11+
$this->run(['item3', 'item4']);
12+
}
13+
14+
private function run(array $items)
15+
{
16+
}
17+
}
18+
19+
?>
20+
-----
21+
<?php
22+
23+
namespace Rector\Tests\TypeDeclarationDocblocks\Rector\Class_\ClassMethodArrayDocblockParamFromLocalCallsRector\Fixture;
24+
25+
class UniqueTypes
26+
{
27+
public function go()
28+
{
29+
$this->run(['item1', 'item2']);
30+
$this->run([1, 2]);
31+
$this->run(['item3', 'item4']);
32+
}
33+
34+
/**
35+
* @param string[]|int[] $items
36+
*/
37+
private function run(array $items)
38+
{
39+
}
40+
}
41+
42+
?>

0 commit comments

Comments
 (0)