From: Thomas Citharel Date: Thu, 30 Mar 2017 14:07:48 +0000 (+0200) Subject: Rename method from *username to *user X-Git-Tag: 2.3.0~31^2~123^2 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=273b6f06584092f3b596406bf4c0d57aa738e8bf;p=github%2Fwallabag%2Fwallabag.git Rename method from *username to *user Signed-off-by: Thomas Citharel --- diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php index f7398e69..8d2ac6d4 100644 --- a/src/Wallabag/CoreBundle/Controller/EntryController.php +++ b/src/Wallabag/CoreBundle/Controller/EntryController.php @@ -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')); } diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php index 4071301d..9325d261 100644 --- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php +++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php @@ -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)') diff --git a/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php b/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php index beb0598a..8f2ca1cb 100644 --- a/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php @@ -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');