Skip to content

Commit 14a5eea

Browse files
committed
more tests
1 parent 5e74532 commit 14a5eea

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/PHPStan/Analyser/nsrt/count-recursive.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,20 @@
66

77
class HelloWorld
88
{
9+
/**
10+
* @param array<array<mixed>> $muliDimArr
11+
* @return void
12+
*/
13+
public function countMultiDim(array $muliDimArr, $mixed): void
14+
{
15+
if (count($muliDimArr, $mixed) > 2) {
16+
assertType('int<1, max>', count($muliDimArr));
17+
assertType('int<3, max>', count($muliDimArr, $mixed));
18+
assertType('int<1, max>', count($muliDimArr, COUNT_NORMAL));
19+
assertType('int<1, max>', count($muliDimArr, COUNT_RECURSIVE));
20+
}
21+
}
22+
923
public function countUnknownArray(array $arr): void
1024
{
1125
assertType('array', $arr);

0 commit comments

Comments
 (0)