fix(BE): enum
This commit is contained in:
parent
8b3aaabbed
commit
28736e5bed
1 changed files with 2 additions and 2 deletions
|
@ -16,13 +16,13 @@ enum ShowRepeatType: int
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static function fromValue(string $value){
|
public static function fromValue(int $value){
|
||||||
foreach (self::cases() as $case) {
|
foreach (self::cases() as $case) {
|
||||||
if ($case->value === $value) {
|
if ($case->value === $value) {
|
||||||
return $case;
|
return $case;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new \InvalidArgumentException("No matching UserType found for value: $value");
|
throw new \InvalidArgumentException("No matching ShowRepeatType found for value: $value");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue