More types

This commit is contained in:
2023-08-02 10:59:15 +00:00
parent 5c7471963c
commit 72de6363fe
6 changed files with 16 additions and 9 deletions

View File

@ -109,7 +109,11 @@ class FactorGraphTrueSkillCalculator extends SkillCalculator
);
}
// Helper function that gets a list of values for all player ratings
/**
* Helper function that gets a list of values for all player ratings
* @return int[]
*/
private static function getPlayerRatingValues(array $teamAssignmentsList, \Closure $playerRatingFunction): array
{
$playerRatingValues = [];
@ -123,7 +127,10 @@ class FactorGraphTrueSkillCalculator extends SkillCalculator
return $playerRatingValues;
}
private static function createPlayerTeamAssignmentMatrix($teamAssignmentsList, $totalPlayers)
/**
* @param Team[] $teamAssignmentsList
*/
private static function createPlayerTeamAssignmentMatrix(array $teamAssignmentsList, int $totalPlayers): Matrix
{
// The team assignment matrix is often referred to as the "A" matrix. It's a matrix whose rows represent the players
// and the columns represent teams. At Matrix[row, column] represents that player[row] is on team[col]