Code Duplication    Length = 11-12 lines in 2 locations

lib/Db/CirclesMapper.php 2 locations

@@ 246-257 (lines=12) @@
243
	 *
244
	 * @return string
245
	 */
246
	private function generateTypeEntryForCirclePrivate(IQueryBuilder $qb, int $type) {
247
248
		if (Circle::CIRCLES_PRIVATE & (int)$type) {
249
			return $qb->expr()
250
					  ->eq(
251
						  'c.type',
252
						  $qb->createNamedParameter(Circle::CIRCLES_PRIVATE)
253
					  );
254
		}
255
256
		return null;
257
	}
258
259
260
	/**
@@ 266-276 (lines=11) @@
263
	 *
264
	 * @return string
265
	 */
266
	private function generateTypeEntryForCirclePublic(IQueryBuilder $qb, int $type) {
267
		if (Circle::CIRCLES_PUBLIC & (int)$type) {
268
			return $qb->expr()
269
					  ->eq(
270
						  'c.type',
271
						  $qb->createNamedParameter(Circle::CIRCLES_PUBLIC)
272
					  );
273
		}
274
275
		return null;
276
	}
277
278
	/**
279
	 * Returns details about a circle.