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

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