diff --git a/app/Domain/Enums/Month.php b/app/Domain/Enums/Month.php index 29f9f2a..9807447 100644 --- a/app/Domain/Enums/Month.php +++ b/app/Domain/Enums/Month.php @@ -48,12 +48,6 @@ enum Month: string public static function fromNameOrCurrent(string $name): Month { - $month = Month::tryFrom($name); - - if ($month === null) { - return Month::current(); - } - - return $month; + return Month::tryFrom($name) ?? Month::current(); } }