Skip to content

Commit ef80918

Browse files
phpstan-botclaude
andcommitted
Remove bar() test case from bug-4090 regression test
The bar() function tested count narrowing via an intermediate variable, which is a pre-existing limitation unrelated to this PR. The assertion documented incorrect behavior (string|false instead of string). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 27e7d59 commit ef80918

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

tests/PHPStan/Analyser/nsrt/bug-4090.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,6 @@ function foo(array $a): void
1717
}
1818

1919

20-
/** @param string[] $a */
21-
function bar(array $a): void
22-
{
23-
$count = count($a);
24-
if ($count > 1) {
25-
echo implode(',', $a);
26-
} elseif ($count === 1) {
27-
assertType('string|false', current($a));
28-
echo trim((string) current($a));
29-
}
30-
}
31-
32-
3320
/** @param string[] $a */
3421
function qux(array $a): void
3522
{

0 commit comments

Comments
 (0)