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

@@ 939-951 (lines=13) @@
936
		}
937
		$cursor->closeCursor();
938
939
		if (!empty($ids)) {
940
			$chunks = array_chunk($ids, 100);
941
			foreach ($chunks as $chunk) {
942
				/*
943
				 * Delete all special shares wit this users for the found group shares
944
				 */
945
				$qb->delete('share')
946
					->where($qb->expr()->eq('share_type', $qb->createNamedParameter(self::SHARE_TYPE_USERGROUP)))
947
					->andWhere($qb->expr()->eq('share_with', $qb->createNamedParameter($uid)))
948
					->andWhere($qb->expr()->in('parent', $qb->createNamedParameter($chunk, IQueryBuilder::PARAM_INT_ARRAY)));
949
				$qb->execute();
950
			}
951
		}
952
	}
953
}
954