Refactoring for PHP8.2

This commit is contained in:
2023-08-01 11:26:38 +00:00
parent 5dd4acf57d
commit 068b6f18aa
18 changed files with 375 additions and 782 deletions

View File

@ -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);