original_string: 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);
      }
code: 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);
      }
code_tokens: 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 ) ; }
docstring: 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
docstring_tokens: Returns a new repository for a specific installation type .