diff options
Diffstat (limited to 'lib/public/Comments')
-rw-r--r-- | lib/public/Comments/CommentsEntityEvent.php | 6 | ||||
-rw-r--r-- | lib/public/Comments/IComment.php | 19 | ||||
-rw-r--r-- | lib/public/Comments/ICommentsEventHandler.php | 1 | ||||
-rw-r--r-- | lib/public/Comments/ICommentsManager.php | 22 |
4 files changed, 22 insertions, 26 deletions
diff --git a/lib/public/Comments/CommentsEntityEvent.php b/lib/public/Comments/CommentsEntityEvent.php index 2d0c50ad95b..39568151b61 100644 --- a/lib/public/Comments/CommentsEntityEvent.php +++ b/lib/public/Comments/CommentsEntityEvent.php @@ -38,9 +38,9 @@ class CommentsEntityEvent extends Event { /** * @param string $name * @param \Closure $entityExistsFunction The closure should take one - * argument, which is the id of the entity, that comments - * should be handled for. The return should then be bool, - * depending on whether comments are allowed (true) or not. + * argument, which is the id of the entity, that comments + * should be handled for. The return should then be bool, + * depending on whether comments are allowed (true) or not. * @throws \OutOfBoundsException when the entity name is already taken * @since 9.1.0 */ diff --git a/lib/public/Comments/IComment.php b/lib/public/Comments/IComment.php index e37a3ee9757..cdfcf188761 100644 --- a/lib/public/Comments/IComment.php +++ b/lib/public/Comments/IComment.php @@ -124,21 +124,12 @@ interface IComment { * returns an array containing mentions that are included in the comment * * @return array each mention provides a 'type' and an 'id', see example below + * @psalm-return list<array{type: 'guest'|'email'|'federated_group'|'group'|'federated_team'|'team'|'federated_user'|'user', id: non-empty-lowercase-string}> + * @since 30.0.2 Type 'email' is supported + * @since 29.0.0 Types 'federated_group', 'federated_team', 'team' and 'federated_user' are supported + * @since 23.0.0 Type 'group' is supported + * @since 17.0.0 Type 'guest' is supported * @since 11.0.0 - * - * The return array looks like: - * [ - * [ - * 'type' => 'user', - * 'id' => 'citizen4' - * ], - * [ - * 'type' => 'group', - * 'id' => 'media' - * ], - * … - * ] - * */ public function getMentions(); diff --git a/lib/public/Comments/ICommentsEventHandler.php b/lib/public/Comments/ICommentsEventHandler.php index dc0a554ff11..148ead2c367 100644 --- a/lib/public/Comments/ICommentsEventHandler.php +++ b/lib/public/Comments/ICommentsEventHandler.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/lib/public/Comments/ICommentsManager.php b/lib/public/Comments/ICommentsManager.php index 15a7d8f8cb1..7e59b5c7b06 100644 --- a/lib/public/Comments/ICommentsManager.php +++ b/lib/public/Comments/ICommentsManager.php @@ -85,10 +85,10 @@ interface ICommentsManager { * @param string $objectType the object type, e.g. 'files' * @param string $objectId the id of the object * @param int $limit optional, number of maximum comments to be returned. if - * not specified, all comments are returned. + * not specified, all comments are returned. * @param int $offset optional, starting point * @param \DateTime|null $notOlderThan optional, timestamp of the oldest comments - * that may be returned + * that may be returned * @return list<IComment> * @since 9.0.0 */ @@ -97,7 +97,7 @@ interface ICommentsManager { $objectId, $limit = 0, $offset = 0, - ?\DateTime $notOlderThan = null + ?\DateTime $notOlderThan = null, ); /** @@ -106,8 +106,9 @@ interface ICommentsManager { * @param int $lastKnownCommentId the last known comment (will be used as offset) * @param string $sortDirection direction of the comments (`asc` or `desc`) * @param int $limit optional, number of maximum comments to be returned. if - * set to 0, all comments are returned. + * set to 0, all comments are returned. * @param bool $includeLastKnown + * @param string $topmostParentId Limit the comments to a list of replies and its original root comment * @return list<IComment> * @since 14.0.0 * @deprecated 24.0.0 - Use getCommentsWithVerbForObjectSinceComment instead @@ -118,7 +119,8 @@ interface ICommentsManager { int $lastKnownCommentId, string $sortDirection = 'asc', int $limit = 30, - bool $includeLastKnown = false + bool $includeLastKnown = false, + string $topmostParentId = '', ): array; /** @@ -128,8 +130,9 @@ interface ICommentsManager { * @param int $lastKnownCommentId the last known comment (will be used as offset) * @param string $sortDirection direction of the comments (`asc` or `desc`) * @param int $limit optional, number of maximum comments to be returned. if - * set to 0, all comments are returned. + * set to 0, all comments are returned. * @param bool $includeLastKnown + * @param string $topmostParentId Limit the comments to a list of replies and its original root comment * @return list<IComment> * @since 24.0.0 */ @@ -140,7 +143,8 @@ interface ICommentsManager { int $lastKnownCommentId, string $sortDirection = 'asc', int $limit = 30, - bool $includeLastKnown = false + bool $includeLastKnown = false, + string $topmostParentId = '', ): array; /** @@ -175,7 +179,7 @@ interface ICommentsManager { * @param $objectType string the object type, e.g. 'files' * @param $objectId string the id of the object * @param \DateTime|null $notOlderThan optional, timestamp of the oldest comments - * that may be returned + * that may be returned * @param string $verb Limit the verb of the comment - Added in 14.0.0 * @return Int * @since 9.0.0 @@ -240,7 +244,7 @@ interface ICommentsManager { string $objectId, string $verb, string $actorType, - array $actors + array $actors, ): array; /** |