Code Duplication    Length = 3-3 lines in 3 locations

lib/private/Share/Share.php 3 locations

@@ 357-359 (lines=3) @@
354
	 * @return array Return list of items with item_target, permissions and expiration
355
	 */
356
	public static function getItemSharedWithUser($itemType, $itemSource, $user, $owner = null, $shareType = null) {
357
		if ($itemType === 'file' || $itemType === 'folder') {
358
			throw new \InvalidArgumentException('Item type "' . $itemType . '" not supported by old share API any more');
359
		}
360
		$shares = [];
361
362
		$where = 'WHERE';
@@ 1092-1094 (lines=3) @@
1089
		if (!self::isEnabled()) {
1090
			return [];
1091
		}
1092
		if ($itemType === 'file' || $itemType === 'folder') {
1093
			throw new \InvalidArgumentException('Item type "' . $itemType . '" not supported by old share API any more');
1094
		}
1095
		$backend = self::getBackend($itemType);
1096
		$collectionTypes = false;
1097
		// Get filesystem root to add it to the file target and remove from the
@@ 1427-1429 (lines=3) @@
1424
	 * @return array of grouped items
1425
	 */
1426
	protected static function groupItems($items, $itemType) {
1427
		if ($itemType === 'file' || $itemType === 'folder') {
1428
			throw new \InvalidArgumentException('Item type "' . $itemType . '" not supported by old share API any more');
1429
		}
1430
		$fileSharing = false;
1431
1432
		$result = [];