@@ 54-56 (lines=3) @@ | ||
51 | return null; |
|
52 | } |
|
53 | ||
54 | if (!isset(static::$choices[$value])) { |
|
55 | throw new \InvalidArgumentException(\sprintf('Invalid value "%s" for ENUM "%s".', $value, $this->getName())); |
|
56 | } |
|
57 | ||
58 | return $value; |
|
59 | } |
|
@@ 182-184 (lines=3) @@ | ||
179 | */ |
|
180 | public static function assertValidChoice(string $value): void |
|
181 | { |
|
182 | if (!isset(static::$choices[$value])) { |
|
183 | throw new \InvalidArgumentException(\sprintf('Invalid value "%s" for ENUM type "%s".', $value, static::class)); |
|
184 | } |
|
185 | } |
|
186 | ||
187 | /** |