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

        self::$setup = true;

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

            // Then return out of setup
            return;
        }

        self::$registered = [];
        self::$services   = [];
        self::$provided   = [];

        $useAnnotations     = $this->app->config(
            'container.useAnnotations',
            false
        );
        $annotationsEnabled = $this->app->config(
            'annotations.enabled',
            false
        );
        $onlyAnnotations    = $this->app->config(
            'container.useAnnotationsExclusively',
            false
        );

        // Setup service providers
        $this->setupServiceProviders();

        // If annotations are enabled and the container should use annotations
        if ($useAnnotations && $annotationsEnabled) {
            // Setup annotated services, contexts, and aliases
            $this->setupAnnotations();

            // If only annotations should be used
            if ($onlyAnnotations) {
                // Return to avoid loading container file
                return;
            }
        }

        // Include the container file
        // NOTE: Included if annotations are set or not due to possibility of
        // container items being defined within the classes as well as within
        // the container file
        require $this->app->config()['container']['filePath'];
    }