protected function initConfig(Composer $composer)
    {
        $repositories = $composer->getConfig()->getRepositories();
        $updated      = false;
        foreach ($repositories as $name => $repo) {
            if (empty($repo['multi-repo-type'])) {
                continue;
            }
            $repo['type']                      = $repo['multi-repo-type'];
            $repositories[$name.'-multi-repo'] = $repo;

            $repositories[$name] = false; // remove old node on merge
            $updated             = true;
        }

        if ($updated) {
            $composer->getConfig()->merge(['repositories' => $repositories]);
        }

        return $this;
    }
protected function initConfig(Composer $composer)
    {
        $repositories = $composer->getConfig()->getRepositories();
        $updated      = false;
        foreach ($repositories as $name => $repo) {
            if (empty($repo['multi-repo-type'])) {
                continue;
            }
            $repo['type']                      = $repo['multi-repo-type'];
            $repositories[$name.'-multi-repo'] = $repo;

            $repositories[$name] = false; // remove old node on merge
            $updated             = true;
        }

        if ($updated) {
            $composer->getConfig()->merge(['repositories' => $repositories]);
        }

        return $this;
    }
protected function initConfig ( Composer $ composer ) { $ repositories = $ composer -> getConfig ( ) -> getRepositories ( ) ; $ updated = false ; foreach ( $ repositories as $ name => $ repo ) { if ( empty ( $ repo [ 'multi-repo-type' ] ) ) { continue ; } $ repo [ 'type' ] = $ repo [ 'multi-repo-type' ] ; $ repositories [ $ name . '-multi-repo' ] = $ repo ; $ repositories [ $ name ] = false ; // remove old node on merge $ updated = true ; } if ( $ updated ) { $ composer -> getConfig ( ) -> merge ( [ 'repositories' => $ repositories ] ) ; } return $ this ; }
Reset multi-repository type

@param \Composer\Composer $composer
@return $this
Reset multi - repository type