From 67bbd6bfebc2d11002ff76b55a701b45dafe4149 Mon Sep 17 00:00:00 2001 From: Benjamin Brahmer Date: Thu, 7 Jan 2021 07:03:10 +0100 Subject: fix the test Signed-off-by: Benjamin Brahmer --- lib/Db/ItemMapper.php | 6 +++--- lib/Service/ItemService.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Db/ItemMapper.php b/lib/Db/ItemMapper.php index d4a16614d..0a59675c3 100644 --- a/lib/Db/ItemMapper.php +++ b/lib/Db/ItemMapper.php @@ -51,8 +51,8 @@ class ItemMapper extends Mapper private function makeSelectQuery( string $prependTo = '', - $oldestFirst = false, - $distinctFingerprint = false + bool $oldestFirst = false, + bool $distinctFingerprint = false ): string { if ($oldestFirst) { $ordering = 'ASC'; @@ -343,7 +343,7 @@ class ItemMapper extends Mapper } - public function findAllUnreadOrStarred(string $userId): array + public function findAllUnreadOrStarred(string $userId): int { $params = [$userId, true, true]; $sql = 'AND (`items`.`unread` = ? OR `items`.`starred` = ?) '; diff --git a/lib/Service/ItemService.php b/lib/Service/ItemService.php index 70f89cfc2..882e875c5 100644 --- a/lib/Service/ItemService.php +++ b/lib/Service/ItemService.php @@ -329,7 +329,7 @@ class ItemService extends Service /** * @param string $userId from which user the items should be taken - * @return array of items which are starred or unread + * @return int of items which are starred or unread */ public function getUnreadOrStarred($userId) { -- cgit v1.2.3