Code Duplication    Length = 5-5 lines in 2 locations

class.json-api-endpoints.php 1 location

@@ 1209-1213 (lines=5) @@
1206
			}
1207
		}
1208
1209
		if ( in_array( $ext, array( 'mp3', 'm4a', 'wav', 'ogg' ) ) ) {
1210
			$metadata = wp_get_attachment_metadata( $media_item->ID );
1211
			$response['length'] = $metadata['length'];
1212
			$response['exif']   = $metadata;
1213
		}
1214
1215
		if ( in_array( $ext, array( 'ogv', 'mp4', 'mov', 'wmv', 'avi', 'mpg', '3gp', '3g2', 'm4v' ) ) ) {
1216
			$metadata = wp_get_attachment_metadata( $media_item->ID );

sal/class.json-api-post-base.php 1 location

@@ 586-590 (lines=5) @@
583
			}
584
		}
585
586
		if ( in_array( $ext, array( 'mp3', 'm4a', 'wav', 'ogg' ) ) ) {
587
			$metadata = wp_get_attachment_metadata( $media_item->ID );
588
			$response['length'] = $metadata['length'];
589
			$response['exif']   = $metadata;
590
		}
591
592
		if ( in_array( $ext, array( 'ogv', 'mp4', 'mov', 'wmv', 'avi', 'mpg', '3gp', '3g2', 'm4v' ) ) ) {
593
			$metadata = wp_get_attachment_metadata( $media_item->ID );