mirror of
https://github.com/furyfire/trueskill.git
synced 2025-06-27 23:21:32 +00:00
Upgrade with rector
This commit is contained in:
@ -9,21 +9,18 @@ namespace DNW\Skills;
|
||||
*/
|
||||
class PairwiseComparison
|
||||
{
|
||||
const WIN = 1;
|
||||
final const WIN = 1;
|
||||
|
||||
const DRAW = 0;
|
||||
final const DRAW = 0;
|
||||
|
||||
const LOSE = -1;
|
||||
final const LOSE = -1;
|
||||
|
||||
public static function getRankFromComparison($comparison)
|
||||
{
|
||||
switch ($comparison) {
|
||||
case PairwiseComparison::WIN:
|
||||
return [1, 2];
|
||||
case PairwiseComparison::LOSE:
|
||||
return [2, 1];
|
||||
default:
|
||||
return [1, 1];
|
||||
}
|
||||
return match ($comparison) {
|
||||
PairwiseComparison::WIN => [1, 2],
|
||||
PairwiseComparison::LOSE => [2, 1],
|
||||
default => [1, 1],
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user