From f9f5e0d5544fd18c831b264121944fd764b73b75 Mon Sep 17 00:00:00 2001 From: Jeroen De Meerleer Date: Tue, 28 May 2019 21:04:45 +0200 Subject: [PATCH] GameModel::getResult can also return null Fixes: Fatal error: Uncaught TypeError: Return value of JeroenED\Libpairtwo\Models\Game::getResult() must be an instance of JeroenED\Libpairtwo\Enums\Gameresult, null returned --- src/Models/Game.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Models/Game.php b/src/Models/Game.php index e8922d8..cc63b69 100644 --- a/src/Models/Game.php +++ b/src/Models/Game.php @@ -19,7 +19,7 @@ abstract class Game /** @var Pairing|null */ private $black; - /** @var GameResult */ + /** @var GameResult|null */ private $result; /** @@ -59,18 +59,18 @@ abstract class Game } /** - * @return Gameresult + * @return Gameresult|null */ - public function getResult(): Gameresult + public function getResult(): ?Gameresult { return $this->result; } /** - * @param Gameresult $result + * @param Gameresult|null $result * @return Game */ - public function setResult(Gameresult $result): Game + public function setResult(?Gameresult $result): Game { $this->result = $result; return $this;