File tree Expand file tree Collapse file tree 2 files changed +39
-5
lines changed
rules-tests/TypeDeclaration/Rector/ClassMethod/AddMethodCallBasedStrictParamTypeRector/Fixture
rules/TypeDeclaration/NodeAnalyzer Expand file tree Collapse file tree 2 files changed +39
-5
lines changed Original file line number Diff line number Diff line change 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+ ?>
Original file line number Diff line number Diff line change @@ -46,11 +46,6 @@ public function resolveStrictTypesFromCalls(array $calls): array
4646 }
4747
4848 /** @var Arg $arg */
49- if ($ this ->isEmptyArray ($ arg ->value )) {
50- // skip empty array, as it doesn't add any value
51- continue ;
52- }
53-
5449 $ staticTypesByArgumentPosition [$ position ][] = $ this ->resolveStrictArgValueType ($ arg );
5550 }
5651 }
You can’t perform that action at this time.
0 commit comments