Code Duplication    Length = 12-13 lines in 2 locations

lib/private/Repair/CleanTags.php 1 location

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

lib/private/Share20/DefaultShareProvider.php 1 location

@@ 1059-1071 (lines=13) @@
1056
		}
1057
		$cursor->closeCursor();
1058
1059
		if (!empty($ids)) {
1060
			$chunks = array_chunk($ids, 100);
1061
			foreach ($chunks as $chunk) {
1062
				/*
1063
				 * Delete all special shares wit this users for the found group shares
1064
				 */
1065
				$qb->delete('share')
1066
					->where($qb->expr()->eq('share_type', $qb->createNamedParameter(self::SHARE_TYPE_USERGROUP)))
1067
					->andWhere($qb->expr()->eq('share_with', $qb->createNamedParameter($uid)))
1068
					->andWhere($qb->expr()->in('parent', $qb->createNamedParameter($chunk, IQueryBuilder::PARAM_INT_ARRAY)));
1069
				$qb->execute();
1070
			}
1071
		}
1072
	}
1073
1074
	/**