mirror of
https://github.com/JeroenED/libpairtwo.git
synced 2024-11-23 15:06:57 +01:00
BUGFIX: elo could be null
This commit is contained in:
parent
6c7249bd3e
commit
e113d743ca
@ -301,9 +301,9 @@ class Player
|
|||||||
*
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function getElo(string $type): int
|
public function getElo(string $type): ?int
|
||||||
{
|
{
|
||||||
return $this->Elos[ $type ];
|
return isset($this->Elos[ $type ]) ? $this->Elos[ $type ] : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -728,7 +728,7 @@ class Tournament
|
|||||||
$tiebreak += $pairing->Opponent->calculatePointsForTiebreaks() / 2;
|
$tiebreak += $pairing->Opponent->calculatePointsForTiebreaks() / 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($pairing->Result === Result::WON_BYE) {
|
if ($pairing->Result == Result::WON_BYE) {
|
||||||
$tiebreak += $player->calculatePointsForVirtualPlayer($key);
|
$tiebreak += $player->calculatePointsForVirtualPlayer($key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user