Code Duplication    Length = 13-16 lines in 3 locations

lib/Db/FederatedLinksRequest.php 1 location

@@ 132-145 (lines=14) @@
129
	 *
130
	 * @return FederatedLink[]
131
	 */
132
	public function getLinksFromCircle($circleUniqueId, $status = 0) {
133
		$qb = $this->getLinksSelectSql();
134
		$this->limitToCircleId($qb, $circleUniqueId);
135
		$this->limitToStatus($qb, $status);
136
137
		$links = [];
138
		$cursor = $qb->execute();
139
		while ($data = $cursor->fetch()) {
140
			$links[] = $this->parseLinksSelectSql($data);
141
		}
142
		$cursor->closeCursor();
143
144
		return $links;
145
	}
146
147
148
	/**

lib/Db/MembersRequest.php 1 location

@@ 297-312 (lines=16) @@
294
	 *
295
	 * @return Member[]
296
	 */
297
	public function forceGetGroupMembers($circleUniqueId, $level = Member::LEVEL_MEMBER) {
298
		$qb = $this->getGroupsSelectSql();
299
300
		$this->limitToLevel($qb, $level);
301
		$this->limitToCircleId($qb, $circleUniqueId);
302
		$this->limitToNCGroupUser($qb);
303
304
		$members = [];
305
		$cursor = $qb->execute();
306
		while ($data = $cursor->fetch()) {
307
			$members[] = $this->parseGroupsSelectSql($data);
308
		}
309
		$cursor->closeCursor();
310
311
		return $members;
312
	}
313
314
315
	/**

lib/ShareByCircleProvider.php 1 location

@@ 457-469 (lines=13) @@
454
	 *
455
	 * @return IShare[]|null
456
	 */
457
	public function getSharesByPath(Node $path) {
458
		$qb = $this->getBaseSelectSql();
459
		$this->limitToFiles($qb, [$path->getId()]);
460
		$cursor = $qb->execute();
461
462
		$shares = [];
463
		while ($data = $cursor->fetch()) {
464
			$shares[] = $this->createShareObject($data);
465
		}
466
		$cursor->closeCursor();
467
468
		return $shares;
469
	}
470
471
472
	/**