Code Duplication    Length = 16-18 lines in 2 locations

lib/Db/MembersRequestBuilder.php 1 location

@@ 153-168 (lines=16) @@
150
	 *
151
	 * @return IQueryBuilder
152
	 */
153
	protected function getMembersUpdateSql($circleId, Member $member) {
154
		$qb = $this->dbConnection->getQueryBuilder();
155
		$expr = $qb->expr();
156
157
		/** @noinspection PhpMethodParametersCountMismatchInspection */
158
		$qb->update(self::TABLE_MEMBERS)
159
		   ->where(
160
			   $expr->andX(
161
				   $expr->eq('circle_id', $qb->createNamedParameter($circleId)),
162
				   $expr->eq('user_id', $qb->createNamedParameter($member->getUserId())),
163
				   $expr->eq('user_type', $qb->createNamedParameter($member->getType()))
164
			   )
165
		   );
166
167
		return $qb;
168
	}
169
170
171
	/**

lib/Migration/UsingShortenUniqueIdInsteadOfCircleId.php 1 location

@@ 132-149 (lines=18) @@
129
	}
130
131
132
	private function swapToShortenUniqueIdInShares($circleId, $shortenUniqueId) {
133
		$qb = $this->connection->getQueryBuilder();
134
		$expr = $qb->expr();
135
136
		/** @noinspection PhpMethodParametersCountMismatchInspection */
137
		$qb->update('share')
138
		   ->where(
139
			   $expr->andX(
140
				   $expr->eq(
141
					   'share_type', $qb->createNamedParameter(Share::SHARE_TYPE_CIRCLE)
142
				   ),
143
				   $expr->eq('share_with', $qb->createNamedParameter($circleId))
144
			   )
145
		   );
146
147
		$qb->set('share_with', $qb->createNamedParameter($shortenUniqueId));
148
		$qb->execute();
149
	}
150
151
152
//	private function cleanBuggyDuplicateEntries($circleId, $shortenUniqueId, $table, $field) {