Code Duplication    Length = 12-13 lines in 2 locations

lib/private/Repair/CleanTags.php 1 location

@@ 189-200 (lines=12) @@
186
			$orphanItems[] = (int) $row[$deleteId];
187
		}
188
189
		if (!empty($orphanItems)) {
190
			$orphanItemsBatch = \array_chunk($orphanItems, 200);
191
			foreach ($orphanItemsBatch as $items) {
192
				$qb->delete($deleteTable)
193
					->where(
194
						$qb->expr()->eq('type', $qb->expr()->literal('files'))
195
					)
196
					->andWhere($qb->expr()->in($deleteId, $qb->createParameter('ids')));
197
				$qb->setParameter('ids', $items, IQueryBuilder::PARAM_INT_ARRAY);
198
				$qb->execute();
199
			}
200
		}
201
202
		if ($repairInfo) {
203
			$output->info(\sprintf($repairInfo, \sizeof($orphanItems)));

lib/private/Share20/DefaultShareProvider.php 1 location

@@ 1212-1224 (lines=13) @@
1209
		}
1210
		$cursor->closeCursor();
1211
1212
		if (!empty($ids)) {
1213
			$chunks = \array_chunk($ids, 100);
1214
			foreach ($chunks as $chunk) {
1215
				/*
1216
				 * Delete all special shares wit this users for the found group shares
1217
				 */
1218
				$qb->delete('share')
1219
					->where($qb->expr()->eq('share_type', $qb->createNamedParameter(self::SHARE_TYPE_USERGROUP)))
1220
					->andWhere($qb->expr()->eq('share_with', $qb->createNamedParameter($uid)))
1221
					->andWhere($qb->expr()->in('parent', $qb->createNamedParameter($chunk, IQueryBuilder::PARAM_INT_ARRAY)));
1222
				$qb->execute();
1223
			}
1224
		}
1225
	}
1226
1227
	/**