protected static function getEnumValidationRule(string $enumClass) : array
    {
        if (!is_a($enumClass, Enum::class, true)) {
            throw new \UnexpectedValueException('Class is not enum');
        }

        return array_merge(['in'], $enumClass::getConstants());
    }
protected static function getEnumValidationRule(string $enumClass) : array
    {
        if (!is_a($enumClass, Enum::class, true)) {
            throw new \UnexpectedValueException('Class is not enum');
        }

        return array_merge(['in'], $enumClass::getConstants());
    }
protected static function getEnumValidationRule ( string $ enumClass ) : array { if ( ! is_a ( $ enumClass , Enum :: class , true ) ) { throw new \ UnexpectedValueException ( 'Class is not enum' ) ; } return array_merge ( [ 'in' ] , $ enumClass :: getConstants ( ) ) ; }
Gets validation rule for given enum class

@deprecated Should use Rule::enum($enumClass)

@param string $enumClass Enum class name
@return array
Gets validation rule for given enum class