Skip to content

Commit fc23154

Browse files
committed
Fix build
1 parent 9c5941f commit fc23154

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

tests/PHPStan/Rules/Methods/OverridingMethodRuleTest.php

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -798,12 +798,16 @@ public function testCheckMissingOverrideAttribute(bool $checkMissingOverrideMeth
798798
public function testBug10153(): void
799799
{
800800
$this->phpVersionId = PHP_VERSION_ID;
801-
$this->analyse([__DIR__ . '/data/bug-10153.php'], [
802-
[
803-
'Return type Bug10153\MyClass2|null of method Bug10153\MyClass2::drc() is not covariant with return type Bug10153\MyClass2 of method Bug10153\MyTrait::drc().',
804-
24,
805-
],
806-
]);
801+
$errors = [];
802+
if (PHP_VERSION_ID >= 80000) {
803+
$errors = [
804+
[
805+
'Return type Bug10153\MyClass2|null of method Bug10153\MyClass2::drc() is not covariant with return type Bug10153\MyClass2 of method Bug10153\MyTrait::drc().',
806+
24,
807+
],
808+
];
809+
}
810+
$this->analyse([__DIR__ . '/data/bug-10153.php'], $errors);
807811
}
808812

809813
}

0 commit comments

Comments
 (0)