Code Duplication    Length = 12-13 lines in 2 locations

lib/private/Repair/CleanTags.php 1 location

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

lib/private/Share20/DefaultShareProvider.php 1 location

@@ 1105-1117 (lines=13) @@
1102
		}
1103
		$cursor->closeCursor();
1104
1105
		if (!empty($ids)) {
1106
			$chunks = array_chunk($ids, 100);
1107
			foreach ($chunks as $chunk) {
1108
				/*
1109
				 * Delete all special shares wit this users for the found group shares
1110
				 */
1111
				$qb->delete('share')
1112
					->where($qb->expr()->eq('share_type', $qb->createNamedParameter(self::SHARE_TYPE_USERGROUP)))
1113
					->andWhere($qb->expr()->eq('share_with', $qb->createNamedParameter($uid)))
1114
					->andWhere($qb->expr()->in('parent', $qb->createNamedParameter($chunk, IQueryBuilder::PARAM_INT_ARRAY)));
1115
				$qb->execute();
1116
			}
1117
		}
1118
	}
1119
1120
	/**