Code Duplication    Length = 5-5 lines in 2 locations

lib/private/Share/Helper.php 2 locations

@@ 141-145 (lines=5) @@
138
			unset($ids[0]);
139
		}
140
141
		if (!empty($changeParent)) {
142
			$idList = "'".implode("','", $changeParent)."'";
143
			$query = \OC_DB::prepare('UPDATE `*PREFIX*share` SET `parent` = ? WHERE `id` IN ('.$idList.')');
144
			$query->execute(array($newParent));
145
		}
146
147
		if (!empty($ids)) {
148
			$idList = "'".implode("','", $ids)."'";
@@ 147-151 (lines=5) @@
144
			$query->execute(array($newParent));
145
		}
146
147
		if (!empty($ids)) {
148
			$idList = "'".implode("','", $ids)."'";
149
			$query = \OC_DB::prepare('DELETE FROM `*PREFIX*share` WHERE `id` IN ('.$idList.')');
150
			$query->execute();
151
		}
152
153
		return $deletedItems;
154
	}