public function addRepository(RepositoryInterface $repository)
    {
        if ($repository instanceof IssueRepository) {
            $type = 'issue';
        } else {
            throw new \Exception('Unknown repository type.');
        }

        $this->repositories[$type] = $repository;
    }
public function addRepository(RepositoryInterface $repository)
    {
        if ($repository instanceof IssueRepository) {
            $type = 'issue';
        } else {
            throw new \Exception('Unknown repository type.');
        }

        $this->repositories[$type] = $repository;
    }
public function addRepository ( RepositoryInterface $ repository ) { if ( $ repository instanceof IssueRepository ) { $ type = 'issue' ; } else { throw new \ Exception ( 'Unknown repository type.' ) ; } $ this -> repositories [ $ type ] = $ repository ; }
Register the repository in the manager

@param RepositoryInterface $repository

@throws \Exception
Register the repository in the manager