src/Composer/Repository/RepositoryManager.php
public function createRepository($type, $config)
    {
        if (!isset($this->repositoryClasses[$type])) {
            throw new \InvalidArgumentException('Repository type is not registered: '.$type);
        }

        $class = $this->repositoryClasses[$type];

        return new $class($config, $this->io, $this->config, $this->eventDispatcher);
    }
public function createRepository($type, $config)
    {
        if (!isset($this->repositoryClasses[$type])) {
            throw new \InvalidArgumentException('Repository type is not registered: '.$type);
        }

        $class = $this->repositoryClasses[$type];

        return new $class($config, $this->io, $this->config, $this->eventDispatcher);
    }
public function createRepository ( $ type , $ config ) { if ( ! isset ( $ this -> repositoryClasses [ $ type ] ) ) { throw new \ InvalidArgumentException ( 'Repository type is not registered: ' . $ type ) ; } $ class = $ this -> repositoryClasses [ $ type ] ; return new $ class ( $ config , $ this -> io , $ this -> config , $ this -> eventDispatcher ) ; }
Returns a new repository for a specific installation type.

@param  string                    $type   repository type
@param  array                     $config repository configuration
@return RepositoryInterface
@throws \InvalidArgumentException if repository for provided type is not registered
Returns a new repository for a specific installation type .