mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Make code clearer and bump @ deprecated annotations
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
a4c599c1c9
commit
3c2b126eba
2 changed files with 7 additions and 5 deletions
|
|
@ -255,9 +255,11 @@ class Group implements IGroup {
|
|||
} else {
|
||||
$userIds = $backend->usersInGroup($this->gid, $search, $limit ?? -1, $offset ?? 0);
|
||||
$userManager = \OCP\Server::get(IUserManager::class);
|
||||
$users = array_merge($users, array_map(function (string $userId) use ($userManager): IUser {
|
||||
return new LazyUser($userId, $userManager);
|
||||
}, $userIds));
|
||||
$userObjects = array_map(
|
||||
fn (string $userId): IUser => new LazyUser($userId, $userManager),
|
||||
$userIds
|
||||
);
|
||||
$users = array_merge($users, $userObjects);
|
||||
}
|
||||
if (!is_null($limit) and $limit <= 0) {
|
||||
return $users;
|
||||
|
|
@ -314,7 +316,7 @@ class Group implements IGroup {
|
|||
* @param int $limit
|
||||
* @param int $offset
|
||||
* @return IUser[]
|
||||
* @deprecated 25.0.0 Use searchUsers instead (same implementation)
|
||||
* @deprecated 26.0.0 Use searchUsers instead (same implementation)
|
||||
*/
|
||||
public function searchDisplayName($search, $limit = null, $offset = null) {
|
||||
return $this->searchUsers($search, $limit, $offset);
|
||||
|
|
|
|||
|
|
@ -299,7 +299,7 @@ class Manager extends PublicEmitter implements IUserManager {
|
|||
* @param int $limit
|
||||
* @param int $offset
|
||||
* @return IUser[]
|
||||
* @deprecated since 25.0.0, use searchDisplayName instead
|
||||
* @deprecated since 26.0.0, use searchDisplayName instead
|
||||
*/
|
||||
public function search($pattern, $limit = null, $offset = null) {
|
||||
$users = [];
|
||||
|
|
|
|||
Loading…
Reference in a new issue