Browse Source

Reduce MissingClosureParamType

Signed-off-by: Vitor Mattos <vitor@php.rio>
pull/6664/head
Vitor Mattos 4 years ago
parent
commit
b933e65e2e
No known key found for this signature in database GPG Key ID: B7AB4B76A7CA7318
  1. 4
      lib/Chat/AutoComplete/Sorter.php
  2. 2
      lib/Chat/Parser/UserMention.php
  3. 2
      lib/Settings/Admin/AdminSettings.php

4
lib/Chat/AutoComplete/Sorter.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) {

2
lib/Chat/Parser/UserMention.php

@ -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']);
});

2
lib/Settings/Admin/AdminSettings.php

@ -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', [

Loading…
Cancel
Save