]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Rename method from *username to *user 3021/head
authorThomas Citharel <tcit@tcit.fr>
Thu, 30 Mar 2017 14:07:48 +0000 (16:07 +0200)
committerThomas Citharel <tcit@tcit.fr>
Thu, 30 Mar 2017 14:07:48 +0000 (16:07 +0200)
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
src/Wallabag/CoreBundle/Controller/EntryController.php
src/Wallabag/CoreBundle/Repository/EntryRepository.php
tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php

index f7398e69ed939bcbcc4a6244b689975c14948a33..8d2ac6d4cf144fd515bf347ec1d0dfa12beb725d 100644 (file)
@@ -227,7 +227,7 @@ class EntryController extends Controller
     public function showUnreadAction(Request $request, $page)
     {
         // load the quickstart if no entry in database
-        if ($page == 1 && $this->get('wallabag_core.entry_repository')->countAllEntriesByUsername($this->getUser()->getId()) == 0) {
+        if ($page == 1 && $this->get('wallabag_core.entry_repository')->countAllEntriesByUser($this->getUser()->getId()) == 0) {
             return $this->redirect($this->generateUrl('quickstart'));
         }
 
index 4071301de0206c1dfbc409b1971d7bd9ff0131c9..9325d261f4e284ead6c1697079d0a6f69b62a841 100644 (file)
@@ -328,7 +328,7 @@ class EntryRepository extends EntityRepository
      *
      * @return int
      */
-    public function countAllEntriesByUsername($userId)
+    public function countAllEntriesByUser($userId)
     {
         $qb = $this->createQueryBuilder('e')
             ->select('count(e)')
index beb0598a969f32dcbe8295a47e98cec18e3adb1a..8f2ca1cb3954c44f4c3610958028fbf996ac7d54 100644 (file)
@@ -798,7 +798,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
 
         $entryReset = $em
             ->getRepository('WallabagCoreBundle:Entry')
-            ->countAllEntriesByUsername($user->getId());
+            ->countAllEntriesByUser($user->getId());
 
         $this->assertEquals(0, $entryReset, 'Entries were reset');
     }
@@ -843,7 +843,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
 
         $entryReset = $em
             ->getRepository('WallabagCoreBundle:Entry')
-            ->countAllEntriesByUsername($user->getId());
+            ->countAllEntriesByUser($user->getId());
 
         $this->assertEquals(0, $entryReset, 'Entries were reset');