mirror of
https://github.com/JeroenED/libpairtwo.git
synced 2024-12-23 12:50:59 +01:00
BUGFIX: elo could be null
This commit is contained in:
parent
6c7249bd3e
commit
e113d743ca
@ -301,9 +301,9 @@ class Player
|
||||
*
|
||||
* @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;
|
||||
}
|
||||
}
|
||||
if ($pairing->Result === Result::WON_BYE) {
|
||||
if ($pairing->Result == Result::WON_BYE) {
|
||||
$tiebreak += $player->calculatePointsForVirtualPlayer($key);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user