diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-12-22 12:16:08 +0100 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2023-04-27 12:00:07 +0200 |
commit | 3c2b126eba063bd056458be50e96d3015d62b66a (patch) | |
tree | dbaa24a973e6d99363281f4c84d984f2dc50cb12 | |
parent | a4c599c1c91dcd6e041cbf65198e1f1200513be8 (diff) | |
download | nextcloud-server-3c2b126eba063bd056458be50e96d3015d62b66a.tar.gz nextcloud-server-3c2b126eba063bd056458be50e96d3015d62b66a.zip |
Make code clearer and bump @ deprecated annotations
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r-- | lib/private/Group/Group.php | 10 | ||||
-rw-r--r-- | lib/private/User/Manager.php | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/lib/private/Group/Group.php b/lib/private/Group/Group.php index bfe985b266e..f70221de8bd 100644 --- a/lib/private/Group/Group.php +++ b/lib/private/Group/Group.php @@ -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); diff --git a/lib/private/User/Manager.php b/lib/private/User/Manager.php index dcf9bbab2f3..e736a198108 100644 --- a/lib/private/User/Manager.php +++ b/lib/private/User/Manager.php @@ -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 = []; |