Code Duplication    Length = 5-5 lines in 3 locations

lib/private/Group/Database.php 3 locations

@@ 249-253 (lines=5) @@
246
			->from('groups')
247
			->orderBy('gid', 'ASC');
248
249
		if ($search !== '') {
250
			$query->where($query->expr()->iLike('gid', $query->createNamedParameter(
251
				'%' . $this->dbConn->escapeLikeParameter($search) . '%'
252
			)));
253
		}
254
255
		$query->setMaxResults($limit)
256
			->setFirstResult($offset);
@@ 313-317 (lines=5) @@
310
			->where($query->expr()->eq('gid', $query->createNamedParameter($gid)))
311
			->orderBy('uid', 'ASC');
312
313
		if ($search !== '') {
314
			$query->andWhere($query->expr()->like('uid', $query->createNamedParameter(
315
				'%' . $this->dbConn->escapeLikeParameter($search) . '%'
316
			)));
317
		}
318
319
		$query->setMaxResults($limit)
320
			->setFirstResult($offset);
@@ 346-350 (lines=5) @@
343
			->from('group_user')
344
			->where($query->expr()->eq('gid', $query->createNamedParameter($gid)));
345
346
		if ($search !== '') {
347
			$query->andWhere($query->expr()->like('uid', $query->createNamedParameter(
348
				'%' . $this->dbConn->escapeLikeParameter($search) . '%'
349
			)));
350
		}
351
352
		$result = $query->execute();
353
		$count = $result->fetchColumn();