Code Duplication    Length = 4-4 lines in 3 locations

lib/private/helper.php 3 locations

@@ 239-242 (lines=4) @@
236
		$icon = str_replace('\\', '-', $icon);
237
238
		// Is it a dir?
239
		if ($mimetype === 'dir') {
240
			self::$mimetypeIcons[$mimetype] = OC::$WEBROOT . '/core/img/filetypes/folder.png';
241
			return OC::$WEBROOT . '/core/img/filetypes/folder.png';
242
		}
243
		if ($mimetype === 'dir-shared') {
244
			self::$mimetypeIcons[$mimetype] = OC::$WEBROOT . '/core/img/filetypes/folder-shared.png';
245
			return OC::$WEBROOT . '/core/img/filetypes/folder-shared.png';
@@ 243-246 (lines=4) @@
240
			self::$mimetypeIcons[$mimetype] = OC::$WEBROOT . '/core/img/filetypes/folder.png';
241
			return OC::$WEBROOT . '/core/img/filetypes/folder.png';
242
		}
243
		if ($mimetype === 'dir-shared') {
244
			self::$mimetypeIcons[$mimetype] = OC::$WEBROOT . '/core/img/filetypes/folder-shared.png';
245
			return OC::$WEBROOT . '/core/img/filetypes/folder-shared.png';
246
		}
247
		if ($mimetype === 'dir-external') {
248
			self::$mimetypeIcons[$mimetype] = OC::$WEBROOT . '/core/img/filetypes/folder-external.png';
249
			return OC::$WEBROOT . '/core/img/filetypes/folder-external.png';
@@ 247-250 (lines=4) @@
244
			self::$mimetypeIcons[$mimetype] = OC::$WEBROOT . '/core/img/filetypes/folder-shared.png';
245
			return OC::$WEBROOT . '/core/img/filetypes/folder-shared.png';
246
		}
247
		if ($mimetype === 'dir-external') {
248
			self::$mimetypeIcons[$mimetype] = OC::$WEBROOT . '/core/img/filetypes/folder-external.png';
249
			return OC::$WEBROOT . '/core/img/filetypes/folder-external.png';
250
		}
251
252
		// Icon exists?
253
		if (file_exists(OC::$SERVERROOT . '/core/img/filetypes/' . $icon . '.png')) {