Code Duplication    Length = 10-10 lines in 2 locations

includes/libs/filebackend/HTTPFileStreamer.php 1 location

@@ 255-264 (lines=10) @@
252
		$ext = strrchr( $filename, '.' );
253
		$ext = $ext === false ? '' : strtolower( substr( $ext, 1 ) );
254
255
		switch ( $ext ) {
256
			case 'gif':
257
				return 'image/gif';
258
			case 'png':
259
				return 'image/png';
260
			case 'jpg':
261
				return 'image/jpeg';
262
			case 'jpeg':
263
				return 'image/jpeg';
264
		}
265
266
		return 'unknown/unknown';
267
	}

includes/StreamFile.php 1 location

@@ 102-111 (lines=10) @@
99
		# trivial detection by file extension,
100
		# used for thumbnails (thumb.php)
101
		if ( $wgTrivialMimeDetection ) {
102
			switch ( $ext ) {
103
				case 'gif':
104
					return 'image/gif';
105
				case 'png':
106
					return 'image/png';
107
				case 'jpg':
108
					return 'image/jpeg';
109
				case 'jpeg':
110
					return 'image/jpeg';
111
			}
112
113
			return 'unknown/unknown';
114
		}