public static function validateEnum($domain, $type, $value)
    {
        self::validateEnumDomainAndType($domain, $type);

        if (!in_array($value, self::$enum[$domain][$type]['values'], true)) {
            throw new \InvalidArgumentException(
                sprintf('Unknown value "%s" for "%s"', $value, $type)
            );
        };
    }
public static function validateEnum($domain, $type, $value)
    {
        self::validateEnumDomainAndType($domain, $type);

        if (!in_array($value, self::$enum[$domain][$type]['values'], true)) {
            throw new \InvalidArgumentException(
                sprintf('Unknown value "%s" for "%s"', $value, $type)
            );
        };
    }
public static function validateEnum ( $ domain , $ type , $ value ) { self :: validateEnumDomainAndType ( $ domain , $ type ) ; if ( ! in_array ( $ value , self :: $ enum [ $ domain ] [ $ type ] [ 'values' ] , true ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Unknown value "%s" for "%s"' , $ value , $ type ) ) ; } ; }
Check if a given value is a valid enum.

@param string $domain - Domain of the enum e.g. issue
@param string $type   - Type to validate (e.g. filter ,state, etc)
@param mixed  $value

@throws \InvalidArgumentException
Check if a given value is a valid enum .