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;
    }
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;
    }
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 ; }
Fetch the user-provided package configuration.

@param  string|null $key
@return object
Fetch the user - provided package configuration .