From 7ff467b392a77d170084d5b18cdea709ec619f6a Mon Sep 17 00:00:00 2001 From: Wiktor Ramut Date: Wed, 2 Oct 2024 14:34:12 +0200 Subject: [PATCH] Review fixes --- src/Enum/DayType.php | 7 +------ src/Enum/EnvironmentEnum.php | 7 +------ src/Enum/StatusResult.php | 7 +------ 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/src/Enum/DayType.php b/src/Enum/DayType.php index d770542..02729cf 100644 --- a/src/Enum/DayType.php +++ b/src/Enum/DayType.php @@ -4,7 +4,7 @@ namespace Answear\OverseasBundle\Enum; -enum DayType: int implements \JsonSerializable +enum DayType: int { case WorkingDay = 1; case Monday = 7; @@ -16,11 +16,6 @@ enum DayType: int implements \JsonSerializable case Saturday2 = 12; case Sunday = 3; - public function jsonSerialize(): int - { - return $this->value; - } - public function getOrdinal(): int { return match ($this) { diff --git a/src/Enum/EnvironmentEnum.php b/src/Enum/EnvironmentEnum.php index b63e93f..f947236 100644 --- a/src/Enum/EnvironmentEnum.php +++ b/src/Enum/EnvironmentEnum.php @@ -4,16 +4,11 @@ namespace Answear\OverseasBundle\Enum; -enum EnvironmentEnum: string implements \JsonSerializable +enum EnvironmentEnum: string { case Prod = 'prod'; case Test = 'test'; - public function jsonSerialize(): string - { - return $this->value; - } - /** * @return string[] */ diff --git a/src/Enum/StatusResult.php b/src/Enum/StatusResult.php index b9c3385..63e88ec 100644 --- a/src/Enum/StatusResult.php +++ b/src/Enum/StatusResult.php @@ -4,14 +4,9 @@ namespace Answear\OverseasBundle\Enum; -enum StatusResult: int implements \JsonSerializable +enum StatusResult: int { case Ok = 0; case Error = 1; case ValidationFailed = 2; - - public function jsonSerialize(): int - { - return $this->value; - } }