aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2024-10-17 12:37:14 +0200
committerJoas Schilling <coding@schilljs.com>2024-10-17 14:27:42 +0200
commitb61a8cfeba5e5fc8eecb9d4d10cd55096b527608 (patch)
tree1302af2c9ae2a2d6140ef7fd6b38ffa0f66c2a72 /lib/public
parent9d6c0afad60fbdcaaa0a58fec3775f1291f8a44c (diff)
downloadnextcloud-server-b61a8cfeba5e5fc8eecb9d4d10cd55096b527608.tar.gz
nextcloud-server-b61a8cfeba5e5fc8eecb9d4d10cd55096b527608.zip
fix(comments): Document supported types and provide psalm typing
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/Comments/IComment.php19
1 files changed, 5 insertions, 14 deletions
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();