Merge pull request #3021 from wallabag/rename-method

Rename method
This commit is contained in:
Jérémy Benoist 2017-03-30 16:40:18 +02:00 committed by GitHub
commit fa884b30ba
3 changed files with 4 additions and 4 deletions

View 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'));
}

View 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)')

View 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');