summaryrefslogtreecommitdiffstats
path: root/lib/private/Comments/Comment.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2021-01-29 10:13:14 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2021-02-06 13:07:06 +0100
commitef7ed47f140eb37f84dd5c9a8b0191f7dcfcc184 (patch)
tree2c57f7ee8cf4da15e10f42ed32b406693c928244 /lib/private/Comments/Comment.php
parent1344c61145c2a9eb36c1c211daa9018f00693c7c (diff)
downloadnextcloud-server-ef7ed47f140eb37f84dd5c9a8b0191f7dcfcc184.tar.gz
nextcloud-server-ef7ed47f140eb37f84dd5c9a8b0191f7dcfcc184.zip
Make Psalm happy
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Comments/Comment.php')
-rw-r--r--lib/private/Comments/Comment.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/Comments/Comment.php b/lib/private/Comments/Comment.php
index c838e9571c6..e2d32e74850 100644
--- a/lib/private/Comments/Comment.php
+++ b/lib/private/Comments/Comment.php
@@ -233,7 +233,9 @@ class Comment implements IComment {
return [];
}
$uids = array_unique($mentions[0]);
- usort($uids, 'mb_strlen');
+ usort($uids, static function($uid1, $uid2) {
+ return mb_strlen($uid2) <=> mb_strlen($uid1);
+ });
$result = [];
foreach ($uids as $uid) {
$cleanUid = trim(substr($uid, 1), '"');