Code Duplication    Length = 11-12 lines in 2 locations

lib/Db/CirclesMapper.php 2 locations

@@ 285-296 (lines=12) @@
282
	 *
283
	 * @return string
284
	 */
285
	private function generateTypeEntryForCirclePrivate(IQueryBuilder $qb, int $type) {
286
		if (Circle::CIRCLES_PRIVATE & (int)$type) {
287
			return $qb->expr()
288
					  ->eq(
289
						  'c.type',
290
						  $qb->createNamedParameter(Circle::CIRCLES_PRIVATE)
291
					  );
292
		}
293
294
		return null;
295
	}
296
297
298
	/**
299
	 * @param IQueryBuilder $qb
@@ 304-314 (lines=11) @@
301
	 *
302
	 * @return string
303
	 */
304
	private function generateTypeEntryForCirclePublic(IQueryBuilder $qb, int $type) {
305
		if (Circle::CIRCLES_PUBLIC & (int)$type) {
306
			return $qb->expr()
307
					  ->eq(
308
						  'c.type',
309
						  $qb->createNamedParameter(Circle::CIRCLES_PUBLIC)
310
					  );
311
		}
312
313
		return null;
314
	}
315
316
	/**
317
	 * Returns details about a circle.