Update app/Domain/Enums/Month.php
Co-authored-by: Marcin Tracz <marcin.tracz@blumilk.pl>
This commit is contained in:
parent
0dfb28d0b3
commit
96192c0f2c
@ -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();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user