Skip to content

Commit 2c574f6

Browse files
committed
Create bug-13675.php
1 parent ac45965 commit 2c574f6

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
3+
namespace Bug13675;
4+
5+
use function assert;
6+
use function PHPStan\Testing\assertType;
7+
8+
class HelloWorld
9+
{
10+
/**
11+
* @param list<int> $listA
12+
* @param list<int> $listB
13+
*/
14+
public function sayHello(int $i, $listA, $listB): void
15+
{
16+
if (!isset($listA[$i])) {
17+
return;
18+
}
19+
assertType('non-empty-list<int>', $listA);
20+
21+
if (count($listA) !== count($listB)) {
22+
return;
23+
}
24+
assertType('non-empty-list<int>', $listB);
25+
}
26+
}
27+

0 commit comments

Comments
 (0)