Skip to content

Commit e95381b

Browse files
committed
Create degrade-closures.php
1 parent 115530e commit e95381b

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
namespace DegradeClosures;
4+
5+
use function PHPStan\Testing\assertType;
6+
7+
$arr = [];
8+
$arr[] = static function () {};
9+
$arr[] = static function () {};
10+
$arr[] = static function () {};
11+
$arr[] = static function () {};
12+
$arr[] = static function () {};
13+
$arr[] = static function () {};
14+
$arr[] = static function () {};
15+
$arr[] = static function () {};
16+
$arr[] = static function () {};
17+
$arr[] = static function () {};
18+
$arr[] = static function () {};
19+
$arr[] = static function () {};
20+
$arr[] = static function () {};
21+
$arr[] = static function () {};
22+
$arr[] = static function () {};
23+
assertType('array{Closure(): void, Closure(): void, Closure(): void, Closure(): void, Closure(): void, Closure(): void, Closure(): void, Closure(): void, Closure(): void, Closure(): void, Closure(): void, Closure(): void, Closure(): void, Closure(): void, Closure(): void}', $arr);
24+
25+
$arr[] = static function () {};
26+
assertType('non-empty-list<callable(): mixed>&oversized-array', $arr);

0 commit comments

Comments
 (0)