Skip to content

Commit f42c9c9

Browse files
Add non regression test
1 parent 83f1509 commit f42c9c9

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

tests/PHPStan/Rules/Functions/ExistingClassesInClosureTypehintsRuleTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,4 +353,9 @@ public function testDeprecatedImplicitlyNullableParameterType(): void
353353
]);
354354
}
355355

356+
public function testBug5206(): void
357+
{
358+
$this->analyse([__DIR__ . '/data/bug-5206.php'], []);
359+
}
360+
356361
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php declare(strict_types = 1);
2+
3+
namespace Bug5206;
4+
5+
class HelloWorld
6+
{
7+
public function sayHello(): \Closure
8+
{
9+
return fn (mixed $mixed) => '`mixed` type!';
10+
}
11+
}

0 commit comments

Comments
 (0)