DBAL/Types/AbstractEnumType.php
public static function assertValidChoice(string $value): void
    {
        if (!isset(static::$choices[$value])) {
            throw new \InvalidArgumentException(\sprintf('Invalid value "%s" for ENUM type "%s".', $value, static::class));
        }
    }
public static function assertValidChoice(string $value): void
    {
        if (!isset(static::$choices[$value])) {
            throw new \InvalidArgumentException(\sprintf('Invalid value "%s" for ENUM type "%s".', $value, static::class));
        }
    }
public static function assertValidChoice ( string $ value ) : void { if ( ! isset ( static :: $ choices [ $ value ] ) ) { throw new \ InvalidArgumentException ( \ sprintf ( 'Invalid value "%s" for ENUM type "%s".' , $ value , static :: class ) ) ; } }
Asserts that given choice exists in the array of ENUM values.

@param string $value ENUM value

@throws \InvalidArgumentException
Asserts that given choice exists in the array of ENUM values .