public static function dispatch()
    {
        self::routeValidator();

        self::$routes = str_replace('//', '/', self::$routes);

        if (in_array(self::$uri, self::$routes, true)) {
            return self::checkRoutes();
        }

        if (self::checkRegexRoutes() !== false) {
            return self::checkRegexRoutes();
        }

        return self::getErrorCallback();
    }