Skip to content

Commit e8e34ca

Browse files
committed
[TypeDeclaration] Allow empty array to native array on AddMethodCallBasedStrictParamTypeRector
1 parent 9bf14f9 commit e8e34ca

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Rector\Tests\TypeDeclaration\Rector\ClassMethod\AddMethodCallBasedStrictParamTypeRector\Fixture;
6+
7+
final class WithEmptyArray
8+
{
9+
public function runFirst()
10+
{
11+
$this->process([]);
12+
}
13+
14+
private function process($data)
15+
{
16+
}
17+
}
18+
19+
?>
20+
-----
21+
<?php
22+
23+
declare(strict_types=1);
24+
25+
namespace Rector\Tests\TypeDeclaration\Rector\ClassMethod\AddMethodCallBasedStrictParamTypeRector\Fixture;
26+
27+
final class WithEmptyArray
28+
{
29+
public function runFirst()
30+
{
31+
$this->process([]);
32+
}
33+
34+
private function process(array $data)
35+
{
36+
}
37+
}
38+
39+
?>

0 commit comments

Comments
 (0)