Skip to content

Commit 4966dab

Browse files
committed
Create bug13674a.php
1 parent a093a2a commit 4966dab

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
3+
namespace Bug13674a;
4+
5+
use function PHPStan\Testing\assertType;
6+
7+
class HelloWorld
8+
{
9+
/**
10+
* @param array<int> $arrayA
11+
* @param list<int> $listA
12+
*/
13+
public function sayHello($arrayA, $listA, int $i): void
14+
{
15+
if (array_key_exists($i, $arrayA)) {
16+
assertType('non-empty-array<int>', $arrayA);
17+
}
18+
19+
if (array_key_exists($i, $listA)) {
20+
assertType('non-empty-list<int>', $listA);
21+
}
22+
}
23+
}

0 commit comments

Comments
 (0)