From a016fcb012ec4af48314d6fb966cdf6de9c31d7f Mon Sep 17 00:00:00 2001 From: Jeroen De Meerleer Date: Sat, 14 Jan 2023 14:34:19 +0100 Subject: [PATCH] Remove getValue from enum calls --- composer.json | 2 +- src/Game.php | 2 +- src/Tournament.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 77b9d38..458b282 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ }, "config": { "platform": { - "php": "7.1" + "php": "8.1" }, "sort-packages": true } diff --git a/src/Game.php b/src/Game.php index de0ab91..3c00ee9 100644 --- a/src/Game.php +++ b/src/Game.php @@ -121,6 +121,6 @@ class Game return ( $this->White->Player === $game->White->Player && $this->Black->Player === $game->Black->Player && - $this->Result->getKey() == $game->Result->getKey()); + $this->Result == $game->Result); } } diff --git a/src/Tournament.php b/src/Tournament.php index f45f96c..b323b7c 100644 --- a/src/Tournament.php +++ b/src/Tournament.php @@ -865,10 +865,10 @@ class Tournament } } $game = new Game(); - if ($color->getValue() == Color::WHITE) { + if ($color == Color::WHITE) { $game->White = $pairing; $game->Black = $opponent; - } elseif ($color->getValue() == Color::BLACK) { + } elseif ($color == Color::BLACK) { $game->White = $opponent; $game->Black = $pairing; }