mirror of
https://github.com/furyfire/trueskill.git
synced 2025-03-19 08:18:38 +00:00
Refactoring for PHP8.2
This commit is contained in:
@ -9,7 +9,7 @@ class DrawMarginTest extends TestCase
|
||||
{
|
||||
const ERROR_TOLERANCE = 0.000001;
|
||||
|
||||
public function testGetDrawMarginFromDrawProbability()
|
||||
public function testGetDrawMarginFromDrawProbability(): void
|
||||
{
|
||||
$beta = 25.0 / 6.0;
|
||||
// The expected values were compared against Ralf Herbrich's implementation in F#
|
||||
@ -18,7 +18,7 @@ class DrawMarginTest extends TestCase
|
||||
$this->assertDrawMargin(0.33, $beta, 2.5111010132487492);
|
||||
}
|
||||
|
||||
private function assertDrawMargin($drawProbability, $beta, $expected)
|
||||
private function assertDrawMargin($drawProbability, $beta, $expected): void
|
||||
{
|
||||
$actual = DrawMargin::getDrawMarginFromDrawProbability($drawProbability, $beta);
|
||||
$this->assertEqualsWithDelta($expected, $actual, DrawMarginTest::ERROR_TOLERANCE);
|
||||
|
Reference in New Issue
Block a user