summaryrefslogtreecommitdiffstats
path: root/lib/Service
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Service')
-rw-r--r--lib/Service/FeedServiceV2.php6
-rw-r--r--lib/Service/FolderServiceV2.php6
-rw-r--r--lib/Service/ItemServiceV2.php6
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);
}
/**