Code Duplication    Length = 5-5 lines in 2 locations

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

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

class.json-api-endpoints.php 1 location

@@ 1262-1266 (lines=5) @@
1259
			}
1260
		}
1261
1262
		if ( in_array( $ext, array( 'mp3', 'm4a', 'wav', 'ogg' ) ) ) {
1263
			$metadata = wp_get_attachment_metadata( $media_item->ID );
1264
			$response['length'] = $metadata['length'];
1265
			$response['exif']   = $metadata;
1266
		}
1267
1268
		if (
1269
		        in_array( $ext, array( 'ogv', 'mp4', 'mov', 'wmv', 'avi', 'mpg', '3gp', '3g2', 'm4v' ) )