ILIAS  trunk Revision v11.0_alpha-1689-g66c127b4ae8
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.ilAbstractUsersGalleryUserCollectionSorter.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 {
23  abstract protected function compare(ilUsersGalleryUser $left, ilUsersGalleryUser $right): int;
24 
25  final public function sort(array $users): array // Missing array type.
26  {
27  uasort($users, function (ilUsersGalleryUser $left, ilUsersGalleryUser $right): int {
28  return $this->compare($left, $right);
29  });
30 
31  return $users;
32  }
33 }
compare(ilUsersGalleryUser $left, ilUsersGalleryUser $right)