Code Duplication    Length = 4-4 lines in 3 locations

lib/private/Files/Type/Detection.php 3 locations

@@ 288-291 (lines=4) @@
285
		$icon = str_replace('\\', '-', $icon);
286
287
		// Is it a dir?
288
		if ($mimetype === 'dir') {
289
			$this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/folder.svg');
290
			return $this->mimetypeIcons[$mimetype];
291
		}
292
		if ($mimetype === 'dir-shared') {
293
			$this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/folder-shared.svg');
294
			return $this->mimetypeIcons[$mimetype];
@@ 292-295 (lines=4) @@
289
			$this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/folder.svg');
290
			return $this->mimetypeIcons[$mimetype];
291
		}
292
		if ($mimetype === 'dir-shared') {
293
			$this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/folder-shared.svg');
294
			return $this->mimetypeIcons[$mimetype];
295
		}
296
		if ($mimetype === 'dir-external') {
297
			$this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/folder-external.svg');
298
			return $this->mimetypeIcons[$mimetype];
@@ 296-299 (lines=4) @@
293
			$this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/folder-shared.svg');
294
			return $this->mimetypeIcons[$mimetype];
295
		}
296
		if ($mimetype === 'dir-external') {
297
			$this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/folder-external.svg');
298
			return $this->mimetypeIcons[$mimetype];
299
		}
300
301
		// Icon exists?
302
		try {