]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Remove useless method 2013/head
authorNicolas Lœuillet <nicolas@loeuillet.org>
Tue, 3 May 2016 07:39:34 +0000 (09:39 +0200)
committerNicolas Lœuillet <nicolas@loeuillet.org>
Tue, 3 May 2016 07:39:34 +0000 (09:39 +0200)
src/Wallabag/CoreBundle/Repository/TagRepository.php

index c567317e0c3b3b9291a8d3d6db127ab4be0f6099..abf915fe5c7f23629af5b746530dc6d6c868d792 100644 (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();
     }