original_string: protected function getQueryBuilder($repositoryMethod)
      {
          $repository = $this
              ->getDriver()
              ->getDoctrineOrmEm()
              ->getRepository($this->getDriver()->getEntityFqn())
          ;
  
          $repositoryMethods = $this->getDriver()->getEntityRepositorySearchableMethods();
  
          if (!method_exists($repository, $repositoryMethods[$repositoryMethod])) {
              return $repository->createQueryBuilder($this->getDriver()->getEntityAlias());
          }
  
          $queryBuilder = $repository->{$repositoryMethods[$repositoryMethod]}();
  
          if (!$queryBuilder instanceof QueryBuilder) {
              throw new ResourceException(sprintf(
                  'The method "%s" of repository class must be return a %s instance',
                  $repositoryMethods[$repositoryMethod],
                  '\Doctrine\ORM\QueryBuilder'
              ));
          }
  
          return $queryBuilder;
      }
code: protected function getQueryBuilder($repositoryMethod)
      {
          $repository = $this
              ->getDriver()
              ->getDoctrineOrmEm()
              ->getRepository($this->getDriver()->getEntityFqn())
          ;
  
          $repositoryMethods = $this->getDriver()->getEntityRepositorySearchableMethods();
  
          if (!method_exists($repository, $repositoryMethods[$repositoryMethod])) {
              return $repository->createQueryBuilder($this->getDriver()->getEntityAlias());
          }
  
          $queryBuilder = $repository->{$repositoryMethods[$repositoryMethod]}();
  
          if (!$queryBuilder instanceof QueryBuilder) {
              throw new ResourceException(sprintf(
                  'The method "%s" of repository class must be return a %s instance',
                  $repositoryMethods[$repositoryMethod],
                  '\Doctrine\ORM\QueryBuilder'
              ));
          }
  
          return $queryBuilder;
      }
code_tokens: protected function getQueryBuilder ( $ repositoryMethod ) { $ repository = $ this -> getDriver ( ) -> getDoctrineOrmEm ( ) -> getRepository ( $ this -> getDriver ( ) -> getEntityFqn ( ) ) ; $ repositoryMethods = $ this -> getDriver ( ) -> getEntityRepositorySearchableMethods ( ) ; if ( ! method_exists ( $ repository , $ repositoryMethods [ $ repositoryMethod ] ) ) { return $ repository -> createQueryBuilder ( $ this -> getDriver ( ) -> getEntityAlias ( ) ) ; } $ queryBuilder = $ repository -> { $ repositoryMethods [ $ repositoryMethod ] } ( ) ; if ( ! $ queryBuilder instanceof QueryBuilder ) { throw new ResourceException ( sprintf ( 'The method "%s" of repository class must be return a %s instance' , $ repositoryMethods [ $ repositoryMethod ] , '\Doctrine\ORM\QueryBuilder' ) ) ; } return $ queryBuilder ; }
docstring: Get the QueryBuilder instance.
  
  @param  string $repositoryMethod
  
  @return QueryBuilder
docstring_tokens: Get the QueryBuilder instance .