Skip to content

Commit cfe1638

Browse files
committed
fix: Make sure Assert::assertIsList correctly asserts an array as list
1 parent 146d9c3 commit cfe1638

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

Diff for: extension.neon

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ parameters:
99
- markTestIncomplete
1010
- markTestSkipped
1111
stubFiles:
12+
- stubs/Assert.stub
1213
- stubs/InvocationMocker.stub
1314
- stubs/MockBuilder.stub
1415
- stubs/MockObject.stub

Diff for: stubs/Assert.stub

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
namespace PHPUnit\Framework;
4+
5+
abstract class Assert
6+
{
7+
/**
8+
* @phpstan-assert list $array
9+
*
10+
* @throws ExpectationFailedException
11+
*/
12+
final public static function assertIsList(mixed $array, string $message = '') {}
13+
}

Diff for: stubs/ExpectationFailedException.stub

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
3+
namespace PHPUnit\Framework;
4+
5+
final class ExpectationFailedException
6+
{
7+
8+
}

0 commit comments

Comments
 (0)