mirror of
https://github.com/JeroenED/libpairtwo.git
synced 2024-12-22 04:11:22 +01:00
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
This commit is contained in:
parent
ce1c0abe52
commit
f9f5e0d554
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user