aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2019-06-05 17:09:05 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2019-06-05 17:09:05 +0200
commit0f2d24feb4709bf0ea97e6152e8a607aaa3c1c72 (patch)
treea18d8487f61a947acddb397a0734e902e6399313 /src/Wallabag/CoreBundle
parentad51743e8bd15782a25c5e717c87786d34091ce3 (diff)
downloadwallabag-0f2d24feb4709bf0ea97e6152e8a607aaa3c1c72.tar.gz
wallabag-0f2d24feb4709bf0ea97e6152e8a607aaa3c1c72.tar.zst
wallabag-0f2d24feb4709bf0ea97e6152e8a607aaa3c1c72.zip
Fix typo & CS
Diffstat (limited to 'src/Wallabag/CoreBundle')
-rw-r--r--src/Wallabag/CoreBundle/Controller/TagController.php2
-rw-r--r--src/Wallabag/CoreBundle/Repository/EntryRepository.php7
2 files changed, 5 insertions, 4 deletions
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
88 $tags = $this->get('wallabag_core.tag_repository') 88 $tags = $this->get('wallabag_core.tag_repository')
89 ->findAllFlatTagsWithNbEntries($this->getUser()->getId()); 89 ->findAllFlatTagsWithNbEntries($this->getUser()->getId());
90 $untagged = $this->get('wallabag_core.entry_repository') 90 $untagged = $this->get('wallabag_core.entry_repository')
91 ->countUntaggedEntriesForUser($this->getUser()->getId()); 91 ->countUntaggedEntriesByUser($this->getUser()->getId());
92 92
93 $renameForms = []; 93 $renameForms = [];
94 foreach ($tags as $tag) { 94 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
131 131
132 /** 132 /**
133 * Retrieve the number of untagged entries for a user. 133 * Retrieve the number of untagged entries for a user.
134 * 134 *
135 * @param int $userId 135 * @param int $userId
136 * 136 *
137 * @return int 137 * @return int
138 */ 138 */
139 public function countUntaggedEntriesByUser($userId) 139 public function countUntaggedEntriesByUser($userId)
140 { 140 {
141 return $this->getRawBuilderForUntaggedByUser($userId) 141 return (int) $this->getRawBuilderForUntaggedByUser($userId)
142 ->select('count(e.id)') 142 ->select('count(e.id)')
143 ->getQuery()
143 ->getSingleScalarResult(); 144 ->getSingleScalarResult();
144 } 145 }
145 146