protected function getPackageConfig($key = null)
    {
        if (! file_exists('integrated.json') && ! file_exists('integrated.php')) {
            return [];
        }

        if ( ! $this->packageConfig) {
            $this->loadPreferredConfigFile();
        }

        if ($key) {
            if (! isset($this->packageConfig[$key])) {
                throw new IntegratedException(
                    "Hmm, did you set a '{$key}' key in your integrated.(json|php) file? Can't find it!"
                );
            }

            return $this->packageConfig[$key];
        }

        return $this->packageConfig;
    }