public function setup(bool $force = false, bool $useCache = true): void
    {
        if (self::$setup && ! $force) {
            return;
        }

        self::$setup = true;

        // If the application should use the events cache files
        if ($useCache && $this->app->config()['events']['useCache']) {
            $this->setupFromCache();

            // Then return out of setup
            return;
        }

        self::$events = [];

        // If annotations are enabled and the events should use annotations
        if (
            $this->app->config()['events']['useAnnotations']
            && $this->app->config()['annotations']['enabled']
        ) {
            // Setup annotated event listeners
            $this->setupAnnotations();

            // If only annotations should be used
            if ($this->app->config()['events']['useAnnotationsExclusively']) {
                // Return to avoid loading events file
                return;
            }
        }

        // Include the events file
        require $this->app->config()['events']['filePath'];
    }