Remove useless method

This commit is contained in:
Nicolas Lœuillet 2016-05-03 09:39:34 +02:00
parent 2a007fe43d
commit e9023a16eb

View file

@ -6,20 +6,6 @@ use Doctrine\ORM\EntityRepository;
class TagRepository extends EntityRepository
{
/**
* Return only the QueryBuilder to retrieve all tags for a given user.
*
* @param int $userId
*
* @return QueryBuilder
*/
private function getQbForAllTags($userId)
{
return $this->createQueryBuilder('t')
->leftJoin('t.entries', 'e')
->where('e.user = :userId')->setParameter('userId', $userId);
}
/**
* Find Tags.
*
@ -29,7 +15,9 @@ class TagRepository extends EntityRepository
*/
public function findAllTags($userId)
{
return $this->getQbForAllTags($userId)
return $this->createQueryBuilder('t')
->leftJoin('t.entries', 'e')
->where('e.user = :userId')->setParameter('userId', $userId)
->getQuery()
->getResult();
}