mirror of
https://github.com/furyfire/trueskill.git
synced 2025-04-19 04:14:28 +00:00
Psalm analysis without warnings.
This commit is contained in:
@ -84,7 +84,7 @@ class TwoTeamTrueSkillCalculator extends SkillCalculator
|
||||
$selfMeanSum = BasicMath::sum($selfTeam->getAllRatings(), $meanGetter);
|
||||
$otherTeamMeanSum = BasicMath::sum($otherTeam->getAllRatings(), $meanGetter);
|
||||
|
||||
$varianceGetter = fn ($currentRating) => BasicMath::square($currentRating->getStandardDeviation());
|
||||
$varianceGetter = fn ($currentRating): float => BasicMath::square($currentRating->getStandardDeviation());
|
||||
|
||||
$c = sqrt(
|
||||
BasicMath::sum($selfTeam->getAllRatings(), $varianceGetter)
|
||||
@ -162,7 +162,7 @@ class TwoTeamTrueSkillCalculator extends SkillCalculator
|
||||
|
||||
$meanGetter = fn ($currentRating) => $currentRating->getMean();
|
||||
|
||||
$varianceGetter = fn ($currentRating) => BasicMath::square($currentRating->getStandardDeviation());
|
||||
$varianceGetter = fn ($currentRating): float => BasicMath::square($currentRating->getStandardDeviation());
|
||||
|
||||
$team1MeanSum = BasicMath::sum($team1Ratings, $meanGetter);
|
||||
$team1StdDevSquared = BasicMath::sum($team1Ratings, $varianceGetter);
|
||||
|
Reference in New Issue
Block a user