Code Duplication    Length = 10-10 lines in 2 locations

lib/private/User/Manager.php 2 locations

@@ 248-257 (lines=10) @@
245
	 * @param int $offset
246
	 * @return \OC\User\User[]
247
	 */
248
	public function search($pattern, $limit = null, $offset = null) {
249
		$accounts = $this->accountMapper->search('user_id', $pattern, $limit, $offset);
250
		$users = [];
251
		foreach ($accounts as $account) {
252
			$user = $this->getUserObject($account);
253
			$users[$user->getUID()] = $user;
254
		}
255
256
		return $users;
257
	}
258
259
	/**
260
	 * find a user account by checking user_id, display name and email fields
@@ 267-276 (lines=10) @@
264
	 * @param int $offset
265
	 * @return \OC\User\User[]
266
	 */
267
	public function find($pattern, $limit = null, $offset = null) {
268
		$accounts = $this->accountMapper->find($pattern, $limit, $offset);
269
		$users = [];
270
		foreach ($accounts as $account) {
271
			$user = $this->getUserObject($account);
272
			$users[$user->getUID()] = $user;
273
		}
274
		return $users;
275
	}
276
277
	/**
278
	 * search by displayName
279
	 *