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

@@ 464-477 (lines=14) @@
461
		$cursor = $qb->execute();
462
463
		$shares = [];
464
		while ($data = $cursor->fetch()) {
465
466
			if ($data['initiator_circle_level'] < Member::LEVEL_MEMBER
467
				&& ($data['initiator_group_level'] < Member::LEVEL_MEMBER
468
					|| !$this->configService->isLinkedGroupsAllowed())
469
			) {
470
				continue;
471
			}
472
473
			self::editShareFromParentEntry($data);
474
			if (self::isAccessibleResult($data)) {
475
				$shares[] = $this->createShareObject($data);
476
			}
477
		}
478
		$cursor->closeCursor();
479
480
		return $shares;