From 0f2d24feb4709bf0ea97e6152e8a607aaa3c1c72 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Wed, 5 Jun 2019 17:09:05 +0200 Subject: Fix typo & CS --- src/Wallabag/CoreBundle/Controller/TagController.php | 2 +- src/Wallabag/CoreBundle/Repository/EntryRepository.php | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src/Wallabag') diff --git a/src/Wallabag/CoreBundle/Controller/TagController.php b/src/Wallabag/CoreBundle/Controller/TagController.php index bd50de7f..91f34b3d 100644 --- a/src/Wallabag/CoreBundle/Controller/TagController.php +++ b/src/Wallabag/CoreBundle/Controller/TagController.php @@ -88,7 +88,7 @@ class TagController extends Controller $tags = $this->get('wallabag_core.tag_repository') ->findAllFlatTagsWithNbEntries($this->getUser()->getId()); $untagged = $this->get('wallabag_core.entry_repository') - ->countUntaggedEntriesForUser($this->getUser()->getId()); + ->countUntaggedEntriesByUser($this->getUser()->getId()); $renameForms = []; foreach ($tags as $tag) { diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php index 77d88c9c..d9675982 100644 --- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php +++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php @@ -131,15 +131,16 @@ class EntryRepository extends EntityRepository /** * Retrieve the number of untagged entries for a user. - * + * * @param int $userId - * + * * @return int */ public function countUntaggedEntriesByUser($userId) { - return $this->getRawBuilderForUntaggedByUser($userId) + return (int) $this->getRawBuilderForUntaggedByUser($userId) ->select('count(e.id)') + ->getQuery() ->getSingleScalarResult(); } -- cgit v1.2.3