public static function getCurrentURL(): Url
    {
        if (static::$currentUrl instanceof Url) {
            return static::$currentUrl;
        }

        if (Application::isCli()) {
            throw new ApplicationException('Can not get current URL while running in CLI mode; URL doesn\'t exist in CLI mode');
        }

        static::$currentUrl = new Url(static::getDomainWithSchema() . static::getUri());
        return static::$currentUrl;
    }