public function getRepository(string $name): Repository
    {
        if (!isset($this->repositories[$name])) {
            throw new \InvalidArgumentException(\sprintf(
                'The name %s is not a valid repository, try one of %s',
                $name,
                \implode(', ', \array_keys($this->repositories))
            ));
        }

        return $this->repositories[$name];
    }
public function getRepository(string $name): Repository
    {
        if (!isset($this->repositories[$name])) {
            throw new \InvalidArgumentException(\sprintf(
                'The name %s is not a valid repository, try one of %s',
                $name,
                \implode(', ', \array_keys($this->repositories))
            ));
        }

        return $this->repositories[$name];
    }
public function getRepository ( string $ name ) : Repository { if ( ! isset ( $ this -> repositories [ $ name ] ) ) { throw new \ InvalidArgumentException ( \ sprintf ( 'The name %s is not a valid repository, try one of %s' , $ name , \ implode ( ', ' , \ array_keys ( $ this -> repositories ) ) ) ) ; } return $ this -> repositories [ $ name ] ; }
Returns a Repository.

@param string $name

@throws \InvalidArgumentException

@return Repository
Returns a Repository .