diff options
author | Sean Molenaar <sean@seanmolenaar.eu> | 2021-03-01 21:10:46 +0100 |
---|---|---|
committer | Sean Molenaar <SMillerDev@users.noreply.github.com> | 2021-03-31 22:39:00 +0200 |
commit | 78dce7ffe18665bf083ff69631db8ae128a2b99f (patch) | |
tree | 1f4e61970b7461afd968552f4bccef53daedbb93 /lib/Service | |
parent | 17f773b723538eedf5bd2efcb8d2c85783d7050f (diff) |
DB: Updates should use set()
Issue GH-1211
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
Diffstat (limited to 'lib/Service')
-rw-r--r-- | lib/Service/FeedServiceV2.php | 6 | ||||
-rw-r--r-- | lib/Service/FolderServiceV2.php | 6 | ||||
-rw-r--r-- | lib/Service/ItemServiceV2.php | 6 |
3 files changed, 11 insertions, 7 deletions
diff --git a/lib/Service/FeedServiceV2.php b/lib/Service/FeedServiceV2.php index 9d577db97..d15dfceb7 100644 --- a/lib/Service/FeedServiceV2.php +++ b/lib/Service/FeedServiceV2.php @@ -347,13 +347,15 @@ class FeedServiceV2 extends Service * @param int $id Feed ID * @param int|null $maxItemID Highest item ID to mark as read * + * @return int + * * @throws ServiceConflictException * @throws ServiceNotFoundException */ - public function read(string $userId, int $id, ?int $maxItemID = null): void + public function read(string $userId, int $id, ?int $maxItemID = null): int { $feed = $this->find($userId, $id); - $this->mapper->read($userId, $feed->getId(), $maxItemID); + return $this->mapper->read($userId, $feed->getId(), $maxItemID); } } diff --git a/lib/Service/FolderServiceV2.php b/lib/Service/FolderServiceV2.php index d13b4afc0..17d955876 100644 --- a/lib/Service/FolderServiceV2.php +++ b/lib/Service/FolderServiceV2.php @@ -186,13 +186,15 @@ class FolderServiceV2 extends Service * @param int $id Folder ID * @param int|null $maxItemID Highest item ID to mark as read * + * @return int + * * @throws ServiceConflictException * @throws ServiceNotFoundException */ - public function read(string $userId, int $id, ?int $maxItemID = null): void + public function read(string $userId, int $id, ?int $maxItemID = null): int { $folder = $this->find($userId, $id); - $this->mapper->read($userId, $folder->getId(), $maxItemID); + return $this->mapper->read($userId, $folder->getId(), $maxItemID); } } diff --git a/lib/Service/ItemServiceV2.php b/lib/Service/ItemServiceV2.php index fafd5e558..57804a8c3 100644 --- a/lib/Service/ItemServiceV2.php +++ b/lib/Service/ItemServiceV2.php @@ -217,11 +217,11 @@ class ItemServiceV2 extends Service * @param string $userId Item owner * @param int $maxItemId * - * @return void + * @return int */ - public function readAll(string $userId, int $maxItemId): void + public function readAll(string $userId, int $maxItemId): int { - $this->mapper->readAll($userId, $maxItemId); + return $this->mapper->readAll($userId, $maxItemId); } /** |