Code Duplication    Length = 5-5 lines in 3 locations

lib/private/Group/Database.php 3 locations

@@ 264-268 (lines=5) @@
261
			->from('groups')
262
			->orderBy('gid', 'ASC');
263
264
		if ($search !== '') {
265
			$query->where($query->expr()->iLike('gid', $query->createNamedParameter(
266
				'%' . $this->dbConn->escapeLikeParameter($search) . '%'
267
			)));
268
		}
269
270
		$query->setMaxResults($limit)
271
			->setFirstResult($offset);
@@ 328-332 (lines=5) @@
325
			->where($query->expr()->eq('gid', $query->createNamedParameter($gid)))
326
			->orderBy('uid', 'ASC');
327
328
		if ($search !== '') {
329
			$query->andWhere($query->expr()->like('uid', $query->createNamedParameter(
330
				'%' . $this->dbConn->escapeLikeParameter($search) . '%'
331
			)));
332
		}
333
334
		$query->setMaxResults($limit)
335
			->setFirstResult($offset);
@@ 361-365 (lines=5) @@
358
			->from('group_user')
359
			->where($query->expr()->eq('gid', $query->createNamedParameter($gid)));
360
361
		if ($search !== '') {
362
			$query->andWhere($query->expr()->like('uid', $query->createNamedParameter(
363
				'%' . $this->dbConn->escapeLikeParameter($search) . '%'
364
			)));
365
		}
366
367
		$result = $query->execute();
368
		$count = $result->fetchColumn();