Code Duplication    Length = 5-5 lines in 2 locations

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

@@ 618-622 (lines=5) @@
615
			}
616
		}
617
618
		if ( in_array( $ext, array( 'mp3', 'm4a', 'wav', 'ogg' ) ) ) {
619
			$metadata = wp_get_attachment_metadata( $media_item->ID );
620
			$response['length'] = $metadata['length'];
621
			$response['exif']   = $metadata;
622
		}
623
624
		if ( in_array( $ext, array( 'ogv', 'mp4', 'mov', 'wmv', 'avi', 'mpg', '3gp', '3g2', 'm4v' ) ) ) {
625
			$metadata = wp_get_attachment_metadata( $media_item->ID );

class.json-api-endpoints.php 1 location

@@ 1380-1384 (lines=5) @@
1377
			}
1378
		}
1379
1380
		if ( in_array( $ext, array( 'mp3', 'm4a', 'wav', 'ogg' ) ) ) {
1381
			$metadata           = wp_get_attachment_metadata( $media_item->ID );
1382
			$response['length'] = $metadata['length'];
1383
			$response['exif']   = $metadata;
1384
		}
1385
1386
		$is_video = false;
1387