Browse Source
Reduce MissingClosureParamType
Signed-off-by: Vitor Mattos <vitor@php.rio>
pull/6664/head
Vitor Mattos
4 years ago
No known key found for this signature in database
GPG Key ID: B7AB4B76A7CA7318
3 changed files with
4 additions and
4 deletions
-
lib/Chat/AutoComplete/Sorter.php
-
lib/Chat/Parser/UserMention.php
-
lib/Settings/Admin/AdminSettings.php
|
|
|
@ -63,13 +63,13 @@ class Sorter implements ISorter { |
|
|
|
$context['itemId'], |
|
|
|
'comment', |
|
|
|
$type, |
|
|
|
array_map(function ($suggestion) { |
|
|
|
array_map(function (array $suggestion) { |
|
|
|
return $suggestion['value']['shareWith']; |
|
|
|
}, $byType)); |
|
|
|
|
|
|
|
$search = $context['search']; |
|
|
|
|
|
|
|
usort($byType, function ($a, $b) use ($lastComments, $search) { |
|
|
|
usort($byType, function (array $a, array $b) use ($lastComments, $search) { |
|
|
|
if ($search) { |
|
|
|
// If the user searched for "Dani" we make sure "Daniel" comes before "Madani"
|
|
|
|
if (stripos($a['label'], $search) === 0) { |
|
|
|
|
|
|
|
@ -86,7 +86,7 @@ class UserMention { |
|
|
|
|
|
|
|
$mentions = $comment->getMentions(); |
|
|
|
// TODO This can be removed once getMentions() returns sorted results (Nextcloud 21+)
|
|
|
|
usort($mentions, static function ($m1, $m2) { |
|
|
|
usort($mentions, static function (array $m1, array $m2) { |
|
|
|
return mb_strlen($m2['id']) <=> mb_strlen($m1['id']); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
@ -469,7 +469,7 @@ class AdminSettings implements ISettings { |
|
|
|
} |
|
|
|
$languages['commonLanguages'] = array_values($languages['commonLanguages']); |
|
|
|
// TODO maybe filter out languages with an _
|
|
|
|
usort($countries, function ($a, $b) { |
|
|
|
usort($countries, function (array $a, array $b) { |
|
|
|
return strcmp($a['name'], $b['name']); |
|
|
|
}); |
|
|
|
$this->initialState->provideInitialState('hosted_signaling_server_language_data', [ |
|
|
|
|