src/Ranges.php
public static function stringOneOf(...$allowedValues): \Closure
	{
		if (!Utils::validateArray(Types::string(), $allowedValues))
			throw new \InvalidArgumentException('Ranges::stringOneOf expects arguments of type string only');

		return function ($value) use ($allowedValues)
		{
			return Types::string() && in_array($value, $allowedValues);
		};
	}
public static function stringOneOf(...$allowedValues): \Closure
	{
		if (!Utils::validateArray(Types::string(), $allowedValues))
			throw new \InvalidArgumentException('Ranges::stringOneOf expects arguments of type string only');

		return function ($value) use ($allowedValues)
		{
			return Types::string() && in_array($value, $allowedValues);
		};
	}
@param array ...$allowedValues

@return \Closure