More standards

This commit is contained in:
2025-04-29 13:21:47 +00:00
parent 38f332b223
commit 55656b7889
8 changed files with 29 additions and 3310 deletions

View File

@ -42,8 +42,10 @@ final class BasicBench
$team1 = new Team($p1, $newRatings->getRating($p1));
$team2 = new Team($p2, $newRatings->getRating($p2));
ob_start();
echo $newRatings->getRating($p1)->getConservativeRating();
echo $newRatings->getRating($p2)->getConservativeRating();
ob_clean();
}
}
@ -73,8 +75,10 @@ final class BasicBench
$team1 = new Team($p1, $newRatings->getRating($p1));
$team2 = new Team($p2, $newRatings->getRating($p2));
ob_start();
echo $newRatings->getRating($p1)->getConservativeRating();
echo $newRatings->getRating($p2)->getConservativeRating();
ob_clean();
}
}
@ -104,8 +108,10 @@ final class BasicBench
$team1 = new Team($p1, $newRatings->getRating($p1));
$team2 = new Team($p2, $newRatings->getRating($p2));
ob_start();
echo $newRatings->getRating($p1)->getConservativeRating();
echo $newRatings->getRating($p2)->getConservativeRating();
ob_clean();
}
}
@ -138,9 +144,11 @@ final class BasicBench
$team2 = new Team($p2, $newRatings->getRating($p2));
$team3 = new Team($p3, $newRatings->getRating($p3));
ob_start();
echo $newRatings->getRating($p1)->getConservativeRating();
echo $newRatings->getRating($p2)->getConservativeRating();
echo $newRatings->getRating($p3)->getConservativeRating();
ob_clean();
}
}
}

View File

@ -8,7 +8,6 @@
"require-dev": {
"phpmetrics/phpmetrics": "^3.0-dev",
"phpunit/phpunit": "^11.2",
"psalm/plugin-phpunit": "^0.18.4",
"rector/rector": "^1.0",
"league/csv": "^9.0"
},

3314
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -44,7 +44,7 @@ final class IteratedTeamDifferencesInnerLayer extends TrueSkillFactorGraphLayer
}
#[\Override]
public function createPriorSchedule(): ?ScheduleSequence
public function createPriorSchedule(): ScheduleSequence
{
switch (count($this->getInputVariablesGroups())) {
case 0:

View File

@ -34,7 +34,7 @@ final class PlayerPerformancesToTeamPerformancesLayer extends TrueSkillFactorGra
}
#[\Override]
public function createPriorSchedule(): ?ScheduleSequence
public function createPriorSchedule(): ScheduleSequence
{
$localFactors = $this->getLocalFactors();
@ -69,7 +69,7 @@ final class PlayerPerformancesToTeamPerformancesLayer extends TrueSkillFactorGra
}
#[\Override]
public function createPosteriorSchedule(): ?ScheduleSequence
public function createPosteriorSchedule(): ScheduleSequence
{
$allFactors = [];
$localFactors = $this->getLocalFactors();

View File

@ -51,7 +51,7 @@ final class PlayerPriorValuesToSkillsLayer extends TrueSkillFactorGraphLayer
}
#[\Override]
public function createPriorSchedule(): ?ScheduleSequence
public function createPriorSchedule(): ScheduleSequence
{
$localFactors = $this->getLocalFactors();

View File

@ -53,7 +53,7 @@ final class PlayerSkillsToPerformancesLayer extends TrueSkillFactorGraphLayer
}
#[\Override]
public function createPriorSchedule(): ?ScheduleSequence
public function createPriorSchedule(): ScheduleSequence
{
$localFactors = $this->getLocalFactors();
@ -68,7 +68,7 @@ final class PlayerSkillsToPerformancesLayer extends TrueSkillFactorGraphLayer
}
#[\Override]
public function createPosteriorSchedule(): ?ScheduleSequence
public function createPosteriorSchedule(): ScheduleSequence
{
$localFactors = $this->getLocalFactors();

View File

@ -159,7 +159,7 @@ final class TwoTeamTrueSkillCalculator extends SkillCalculator
$team2Ratings = $teams[1]->getAllRatings();
$team2Count = count($team2Ratings);
$totalPlayers = $team1Count + $team2Count;
$totalPlayers = (float)($team1Count + $team2Count);
$betaSquared = BasicMath::square($gameInfo->getBeta());