Skip to content

Commit cbc6c11

Browse files
Fix
1 parent be43835 commit cbc6c11

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tests/PHPStan/Rules/Functions/ExistingClassesInArrowFunctionTypehintsRuleTest.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,15 @@ public function testNever(): void
313313

314314
public function testBug5206(): void
315315
{
316-
$this->analyse([__DIR__ . '/data/bug-5206.php'], []);
316+
$errors = [];
317+
if (PHP_VERSION_ID < 80000) {
318+
$errors[] = [
319+
'Parameter $mixed of anonymous function has invalid type Bug5206\mixed.',
320+
9,
321+
];
322+
}
323+
324+
$this->analyse([__DIR__ . '/data/bug-5206.php'], $errors);
317325
}
318326

319327
}

0 commit comments

Comments
 (0)