File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed
tests/PHPStan/Rules/PhpDoc Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -215,6 +215,15 @@ public function testBug10861(): void
215
215
$ this ->analyse ([__DIR__ . '/data/bug-10861.php ' ], []);
216
216
}
217
217
218
+ public function testBug11535 (): void
219
+ {
220
+ $ this ->checkTypeAgainstNativeType = true ;
221
+ $ this ->checkTypeAgainstPhpDocType = true ;
222
+ $ this ->strictWideningCheck = true ;
223
+
224
+ $ this ->analyse ([__DIR__ . '/data/bug-11535.php ' ], []);
225
+ }
226
+
218
227
public function testEnums (): void
219
228
{
220
229
if (PHP_VERSION_ID < 80100 ) {
Original file line number Diff line number Diff line change
1
+ <?php declare (strict_types = 1 );
2
+
3
+ namespace Bug11535 ;
4
+
5
+ /** @var \Closure(string): array<int> */
6
+ $ a = function (string $ b ) {
7
+ return [1 ,2 ,3 ];
8
+ };
9
+
10
+ /** @var \Closure(array): array */
11
+ $ a = function (array $ b ) {
12
+ return $ b ;
13
+ };
14
+
15
+ /** @var \Closure(string): string */
16
+ $ a = function (string $ b ) {
17
+ return $ b ;
18
+ };
You can’t perform that action at this time.
0 commit comments