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

@@ 424-436 (lines=13) @@
421
	 *
422
	 * @return IShare[]|null
423
	 */
424
	public function getSharesByPath(Node $path) {
425
		$qb = $this->getBaseSelectSql();
426
		$this->limitToFiles($qb, [$path->getId()]);
427
		$cursor = $qb->execute();
428
429
		$shares = [];
430
		while ($data = $cursor->fetch()) {
431
			$shares[] = $this->createShareObject($data);
432
		}
433
		$cursor->closeCursor();
434
435
		return $shares;
436
	}
437
438
439
	/**