original_string: public function getRepositoryForEntity(string $entityName, string $connectionName = null): AbstractRepository
      {
          /** @var AbstractRepository $repository */
          $repository = $this->loadFactorableInstance($entityName);
  
          if (is_string($connectionName)) {
              $entityManager = $this->getContainer()->get('doctrine')->getManager($connectionName);
              $repository->setEntityManager($entityManager);
          }
  
          $this->onFactorableLoaded($repository);
  
          return $repository;
      }
code: public function getRepositoryForEntity(string $entityName, string $connectionName = null): AbstractRepository
      {
          /** @var AbstractRepository $repository */
          $repository = $this->loadFactorableInstance($entityName);
  
          if (is_string($connectionName)) {
              $entityManager = $this->getContainer()->get('doctrine')->getManager($connectionName);
              $repository->setEntityManager($entityManager);
          }
  
          $this->onFactorableLoaded($repository);
  
          return $repository;
      }
code_tokens: public function getRepositoryForEntity ( string $ entityName , string $ connectionName = null ) : AbstractRepository { /** @var AbstractRepository $repository */ $ repository = $ this -> loadFactorableInstance ( $ entityName ) ; if ( is_string ( $ connectionName ) ) { $ entityManager = $ this -> getContainer ( ) -> get ( 'doctrine' ) -> getManager ( $ connectionName ) ; $ repository -> setEntityManager ( $ entityManager ) ; } $ this -> onFactorableLoaded ( $ repository ) ; return $ repository ; }
docstring: Gets a repository for an entity
  
  @param string $entityName
  @param string $connectionName
  
  @return AbstractRepository
docstring_tokens: Gets a repository for an entity