Code Duplication    Length = 14-22 lines in 2 locations

lib/CirclesQueryHelper.php 2 locations

@@ 135-156 (lines=22) @@
132
	 * @return ICompositeExpression
133
	 * @throws RequestBuilderException
134
	 */
135
	public function limitToInheritedMembers(
136
		string $alias,
137
		string $field,
138
		IFederatedUser $federatedUser,
139
		bool $fullDetails = false
140
	): ICompositeExpression {
141
		$this->queryBuilder->setDefaultSelectAlias($alias);
142
		$this->queryBuilder->setOptions(
143
			[CoreQueryBuilder::HELPER],
144
			[
145
				'getData'      => $fullDetails,
146
				'mustBeMember' => true
147
			]
148
		);
149
150
		return $this->queryBuilder->limitToInitiator(
151
			CoreQueryBuilder::HELPER,
152
			$federatedUser,
153
			$field,
154
			$alias
155
		);
156
	}
157
158
159
	/**
@@ 165-178 (lines=14) @@
162
	 *
163
	 * @throws RequestBuilderException
164
	 */
165
	public function addCircleDetails(
166
		string $alias,
167
		string $field
168
	): void {
169
		$this->queryBuilder->setDefaultSelectAlias($alias);
170
		$this->queryBuilder->setOptions(
171
			[CoreQueryBuilder::HELPER],
172
			[
173
				'getData' => true
174
			]
175
		);
176
177
		$this->queryBuilder->leftJoinCircle(CoreQueryBuilder::HELPER, null, $field, $alias);
178
	}
179
180
181
	/**