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

@@ 1374-1378 (lines=5) @@
1371
			}
1372
		}
1373
1374
		if ( in_array( $ext, array( 'mp3', 'm4a', 'wav', 'ogg' ) ) ) {
1375
			$metadata           = wp_get_attachment_metadata( $media_item->ID );
1376
			$response['length'] = $metadata['length'];
1377
			$response['exif']   = $metadata;
1378
		}
1379
1380
		$is_video = false;
1381