Skip to content

Commit a38f0f1

Browse files
staabmondrejmirtes
authored andcommitted
Added regression test
1 parent 39fe102 commit a38f0f1

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

tests/PHPStan/Rules/Methods/ReturnTypeRuleTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -993,4 +993,9 @@ public function testBug10291(): void
993993
$this->analyse([__DIR__ . '/data/bug-10291.php'], []);
994994
}
995995

996+
public function testBug5008(): void
997+
{
998+
$this->analyse([__DIR__ . '/data/bug-5008.php'], []);
999+
}
1000+
9961001
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php declare(strict_types = 1);
2+
3+
namespace Bug5008;
4+
5+
class SomeHelper
6+
{
7+
/**
8+
* @return -1|0|1
9+
*/
10+
public static function f(int $a, int $b): int
11+
{
12+
return $a <=> $b;
13+
}
14+
}

0 commit comments

Comments
 (0)