Code Duplication    Length = 18-21 lines in 4 locations

includes/media/FormatMetadata.php 4 locations

@@ 168-187 (lines=20) @@
165
166
			foreach ( $vals as &$val ) {
167
				switch ( $tag ) {
168
					case 'Compression':
169
						switch ( $val ) {
170
							case 1:
171
							case 2:
172
							case 3:
173
							case 4:
174
							case 5:
175
							case 6:
176
							case 7:
177
							case 8:
178
							case 32773:
179
							case 32946:
180
							case 34712:
181
								$val = $this->exifMsg( $tag, $val );
182
								break;
183
							default:
184
								/* If not recognized, display as is. */
185
								break;
186
						}
187
						break;
188
189
					case 'PhotometricInterpretation':
190
						switch ( $val ) {
@@ 189-209 (lines=21) @@
186
						}
187
						break;
188
189
					case 'PhotometricInterpretation':
190
						switch ( $val ) {
191
							case 0:
192
							case 1:
193
							case 2:
194
							case 3:
195
							case 4:
196
							case 5:
197
							case 6:
198
							case 8:
199
							case 9:
200
							case 10:
201
							case 32803:
202
							case 34892:
203
								$val = $this->exifMsg( $tag, $val );
204
								break;
205
							default:
206
								/* If not recognized, display as is. */
207
								break;
208
						}
209
						break;
210
211
					case 'Orientation':
212
						switch ( $val ) {
@@ 344-361 (lines=18) @@
341
						// else it will just output $val without formatting it.
342
						break;
343
344
					case 'ExposureProgram':
345
						switch ( $val ) {
346
							case 0:
347
							case 1:
348
							case 2:
349
							case 3:
350
							case 4:
351
							case 5:
352
							case 6:
353
							case 7:
354
							case 8:
355
								$val = $this->exifMsg( $tag, $val );
356
								break;
357
							default:
358
								/* If not recognized, display as is. */
359
								break;
360
						}
361
						break;
362
363
					case 'SubjectDistance':
364
						$val = $this->exifMsg( $tag, '', $this->formatNum( $val ) );
@@ 367-384 (lines=18) @@
364
						$val = $this->exifMsg( $tag, '', $this->formatNum( $val ) );
365
						break;
366
367
					case 'MeteringMode':
368
						switch ( $val ) {
369
							case 0:
370
							case 1:
371
							case 2:
372
							case 3:
373
							case 4:
374
							case 5:
375
							case 6:
376
							case 7:
377
							case 255:
378
								$val = $this->exifMsg( $tag, $val );
379
								break;
380
							default:
381
								/* If not recognized, display as is. */
382
								break;
383
						}
384
						break;
385
386
					case 'LightSource':
387
						switch ( $val ) {