diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2019-06-05 17:09:05 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2019-06-05 17:09:05 +0200 |
commit | 0f2d24feb4709bf0ea97e6152e8a607aaa3c1c72 (patch) | |
tree | a18d8487f61a947acddb397a0734e902e6399313 /src | |
parent | ad51743e8bd15782a25c5e717c87786d34091ce3 (diff) | |
download | wallabag-0f2d24feb4709bf0ea97e6152e8a607aaa3c1c72.tar.gz wallabag-0f2d24feb4709bf0ea97e6152e8a607aaa3c1c72.tar.zst wallabag-0f2d24feb4709bf0ea97e6152e8a607aaa3c1c72.zip |
Fix typo & CS
Diffstat (limited to 'src')
-rw-r--r-- | src/Wallabag/CoreBundle/Controller/TagController.php | 2 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Repository/EntryRepository.php | 7 |
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 | ||