private function locateGlobal($key)
    {
        $path = $this->composer->getConfig()->get('home');

        $globalComposerJsonFile = $path . '/composer.json';

        if (file_exists($globalComposerJsonFile)) {
            $globalComposerJson = json_decode(file_get_contents($globalComposerJsonFile), true);

            if (array_key_exists('extra', $globalComposerJson) && array_key_exists($key, $globalComposerJson['extra'])) {
                $this->cache[$key] = [
                    'found' => true,
                    'config' => $globalComposerJson['extra'][$key],
                    'path' => $path,
                ];

                return true;
            }
        }

        return false;
    }
private function locateGlobal($key)
    {
        $path = $this->composer->getConfig()->get('home');

        $globalComposerJsonFile = $path . '/composer.json';

        if (file_exists($globalComposerJsonFile)) {
            $globalComposerJson = json_decode(file_get_contents($globalComposerJsonFile), true);

            if (array_key_exists('extra', $globalComposerJson) && array_key_exists($key, $globalComposerJson['extra'])) {
                $this->cache[$key] = [
                    'found' => true,
                    'config' => $globalComposerJson['extra'][$key],
                    'path' => $path,
                ];

                return true;
            }
        }

        return false;
    }
private function locateGlobal ( $ key ) { $ path = $ this -> composer -> getConfig ( ) -> get ( 'home' ) ; $ globalComposerJsonFile = $ path . '/composer.json' ; if ( file_exists ( $ globalComposerJsonFile ) ) { $ globalComposerJson = json_decode ( file_get_contents ( $ globalComposerJsonFile ) , true ) ; if ( array_key_exists ( 'extra' , $ globalComposerJson ) && array_key_exists ( $ key , $ globalComposerJson [ 'extra' ] ) ) { $ this -> cache [ $ key ] = [ 'found' => true , 'config' => $ globalComposerJson [ 'extra' ] [ $ key ] , 'path' => $ path , ] ; return true ; } } return false ; }
Search config in the global root package.

@param string $key

@return bool
Search config in the global root package .