public static function toRange($string)
    {
        if (null === $string) {
            return null;
        } elseif ('' === $string) {
            return [];
        }

        if (!strstr($string, '..')) {
            return [];
        }

        list($min, $max) = explode('..', $string, 2);
        if (null == $min || null == $max) {
            return [];
        }

        return range($min, $max);
    }