Code Duplication    Length = 19-20 lines in 2 locations

lib/Db/CircleProviderRequestBuilder.php 2 locations

@@ 425-443 (lines=19) @@
422
	 *
423
	 * @return IQueryBuilder
424
	 */
425
	protected function getBaseSelectSql($shareId = -1) {
426
		$qb = $this->dbConnection->getQueryBuilder();
427
428
		/** @noinspection PhpMethodParametersCountMismatchInspection */
429
		$qb->select(
430
			's.id', 's.share_type', 's.share_with', 's.uid_owner', 's.uid_initiator',
431
			's.parent', 's.item_type', 's.item_source', 's.item_target', 's.file_source',
432
			's.file_target', 's.permissions', 's.stime', 's.accepted', 's.expiration',
433
			's.token', 's.mail_send', 'c.type AS circle_type', 'c.name AS circle_name',
434
			'mo.user_id AS circle_owner'
435
		);
436
		$this->linkToCircleOwner($qb);
437
		$this->joinShare($qb);
438
439
		// TODO: Left-join circle and REMOVE this line
440
		$this->linkCircleField($qb, $shareId);
441
442
		return $qb;
443
	}
444
445
446
	/**
@@ 466-485 (lines=20) @@
463
	}
464
465
466
	protected function getCompleteSelectSql() {
467
		$qb = $this->dbConnection->getQueryBuilder();
468
469
		/** @noinspection PhpMethodParametersCountMismatchInspection */
470
		$qb->select(
471
			's.*', 'f.fileid', 'f.path', 'f.permissions AS f_permissions', 'f.storage',
472
			'f.path_hash', 'f.parent AS f_parent', 'f.name', 'f.mimetype', 'f.mimepart',
473
			'f.size', 'f.mtime', 'f.storage_mtime', 'f.encrypted', 'f.unencrypted_size',
474
			'f.etag', 'f.checksum', 'c.type AS circle_type', 'c.name AS circle_name',
475
			'mo.user_id AS circle_owner'
476
		)
477
		   ->selectAlias('st.id', 'storage_string_id');
478
479
		$this->linkToCircleOwner($qb);
480
		$this->joinShare($qb);
481
		$this->linkCircleField($qb);
482
483
484
		return $qb;
485
	}
486
487
488
	/**