[ticket/17399] Fix declaration to be in line with PHP documentation

PHPBB-17399
This commit is contained in:
Marc Alexander 2025-06-15 19:59:13 +02:00
parent d017eff8f1
commit 9c49a2b86b
No known key found for this signature in database
GPG key ID: 50E0D2423696F995

View file

@ -129,10 +129,23 @@ class language_file_helper
/** /**
* Sorts the languages by their name instead of iso code * Sorts the languages by their name instead of iso code
* *
* @return array * @param mixed $a First language data
* @param mixed $b Second language data
* @return int
*/ */
private static function sort_by_local_name($a, $b) private static function sort_by_local_name(mixed $a, mixed $b): int
{ {
return $a['local_name'] > $b['local_name']; if ($a['local_name'] > $b['local_name'])
{
return 1;
}
else if ($a['local_name'] < $b['local_name'])
{
return -1;
}
else
{
return 0;
}
} }
} }