Code Duplication    Length = 11-11 lines in 2 locations

lib/private/Group/Group.php 2 locations

@@ 213-223 (lines=11) @@
210
	 * @param int $offset
211
	 * @return \OC\User\User[]
212
	 */
213
	public function searchUsers($search, $limit = null, $offset = null) {
214
		$users = [];
215
		foreach ($this->backends as $backend) {
216
			$userIds = $backend->usersInGroup($this->gid, $search, $limit, $offset);
217
			$users += $this->getVerifiedUsers($userIds);
218
			if ($limit !== null and $limit <= 0) {
219
				return \array_values($users);
220
			}
221
		}
222
		return \array_values($users);
223
	}
224
225
	/**
226
	 * returns the number of users matching the search string
@@ 254-264 (lines=11) @@
251
	 * @param int $offset
252
	 * @return \OC\User\User[]
253
	 */
254
	public function searchDisplayName($search, $limit = null, $offset = null) {
255
		$users = [];
256
		foreach ($this->backends as $backend) {
257
			$userIds = $backend->usersInGroup($this->gid, $search, $limit, $offset);
258
			$users = $this->getVerifiedUsers($userIds);
259
			if ($limit !== null and $limit <= 0) {
260
				return \array_values($users);
261
			}
262
		}
263
		return \array_values($users);
264
	}
265
266
	/**
267
	 * delete the group