Skip to content

Commit 3ab9c4f

Browse files
staabmondrejmirtes
authored andcommitted
Update narrow-tagged-union.php
1 parent ec3400f commit 3ab9c4f

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

tests/PHPStan/Analyser/nsrt/narrow-tagged-union.php

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -79,25 +79,6 @@ public function nestedArrays(array $arr): void
7979
assertType("array{array<int>, numeric-string}|array{string, '', non-empty-string}", $arr);
8080
}
8181

82-
/** @param array{string, '', non-empty-string}|array{array<int>, numeric-string} $arr */
83-
public function nonArray(array $arr): void
84-
{
85-
// don't narrow when $arr contains recursive arrays
86-
if (count($arr, COUNT_RECURSIVE) === 3) {
87-
assertType("array{array<int>, numeric-string}|array{string, '', non-empty-string}", $arr);
88-
} else {
89-
assertType("array{array<int>, numeric-string}|array{string, '', non-empty-string}", $arr);
90-
}
91-
assertType("array{array<int>, numeric-string}|array{string, '', non-empty-string}", $arr);
92-
93-
if (count($arr, COUNT_NORMAL) === 3) {
94-
assertType("array{string, '', non-empty-string}", $arr);
95-
} else {
96-
assertType("array{array<int>, numeric-string}", $arr);
97-
}
98-
assertType("array{array<int>, numeric-string}|array{string, '', non-empty-string}", $arr);
99-
}
100-
10182
public function arrayIntRangeSize(): void
10283
{
10384
$x = [];

0 commit comments

Comments
 (0)