Code Duplication    Length = 5-5 lines in 2 locations

class.json-api-endpoints.php 1 location

@@ 1202-1206 (lines=5) @@
1199
			}
1200
		}
1201
1202
		if ( in_array( $ext, array( 'mp3', 'm4a', 'wav', 'ogg' ) ) ) {
1203
			$metadata = wp_get_attachment_metadata( $media_item->ID );
1204
			$response['length'] = $metadata['length'];
1205
			$response['exif']   = $metadata;
1206
		}
1207
1208
		if ( in_array( $ext, array( 'ogv', 'mp4', 'mov', 'wmv', 'avi', 'mpg', '3gp', '3g2', 'm4v' ) ) ) {
1209
			$metadata = wp_get_attachment_metadata( $media_item->ID );

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

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