public static function separateRut(string $rut, bool $uppercase = true)
    {
        // Throw an exception if after cleaning the RUT we receive null, since
        // we cannot separate an empty string, thus making the resulting
        // array impossible to return. Also, it makes it catchable.
        if (empty($cleaned = self::cleanRut($rut, $uppercase))) {
            throw new InvalidRutException($rut);
        }

        $array = self::explodeByLastChar($cleaned);

        $array[0] = (int)$array[0];

        return $array;
    }