mirror of
https://codeberg.org/vlw/php-xenum.git
synced 2025-09-13 20:23:41 +02:00
fix: use global namespace for ValueError
This commit is contained in:
parent
1c997a5574
commit
c252bca4c7
1 changed files with 2 additions and 2 deletions
|
@ -23,7 +23,7 @@
|
|||
// Throw a ValueError if Enum name is not found
|
||||
public static function fromName(?string $name): static {
|
||||
$case = self::tryFromName($name);
|
||||
return $case ? $case : throw new ValueError("'{$name}' is not a valid case for enum " . self::class);
|
||||
return $case ? $case : throw new \ValueError("'{$name}' is not a valid case for enum " . self::class);
|
||||
}
|
||||
|
||||
// Return array of enum names
|
||||
|
|
Loading…
Add table
Reference in a new issue