diff --git a/src/Player.php b/src/Player.php index 36efc25..8cf39ce 100644 --- a/src/Player.php +++ b/src/Player.php @@ -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; } /** diff --git a/src/Tournament.php b/src/Tournament.php index 125d9f0..a61217f 100644 --- a/src/Tournament.php +++ b/src/Tournament.php @@ -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); } }