Code Duplication    Length = 14-14 lines in 2 locations

lib/Db/CircleProviderRequest.php 1 location

@@ 57-70 (lines=14) @@
54
		$cursor = $qb->execute();
55
56
		$object_ids = [];
57
		while ($data = $cursor->fetch()) {
58
59
			if ($data['initiator_circle_level'] < Member::LEVEL_MEMBER
60
				&& ($data['initiator_group_level'] < Member::LEVEL_MEMBER
61
					|| !$this->configService->isLinkedGroupsAllowed())
62
			) {
63
				continue;
64
			}
65
66
			self::editShareFromParentEntry($data);
67
			if (self::isAccessibleResult($data)) {
68
				$object_ids[] = $data['file_source'];
69
			}
70
		}
71
		$cursor->closeCursor();
72
73
		return $object_ids;

lib/ShareByCircleProvider.php 1 location

@@ 475-488 (lines=14) @@
472
		$cursor = $qb->execute();
473
474
		$shares = [];
475
		while ($data = $cursor->fetch()) {
476
477
			if ($data['initiator_circle_level'] < Member::LEVEL_MEMBER
478
				&& ($data['initiator_group_level'] < Member::LEVEL_MEMBER
479
					|| !$this->configService->isLinkedGroupsAllowed())
480
			) {
481
				continue;
482
			}
483
484
			self::editShareFromParentEntry($data);
485
			if (self::isAccessibleResult($data)) {
486
				$shares[] = $this->createShareObject($data);
487
			}
488
		}
489
		$cursor->closeCursor();
490
491
		return $shares;