Code Duplication    Length = 5-5 lines in 2 locations

projects/plugins/jetpack/json-endpoints/class.wpcom-json-api-edit-media-v1-2-endpoint.php 1 location

@@ 145-149 (lines=5) @@
142
		// Attributes: Artist, Album
143
		$id3_meta = array();
144
145
		foreach ( array( 'artist', 'album' ) as $key ) {
146
			if ( isset( $attrs[ $key ] ) ) {
147
				$id3_meta[ $key ] = wp_strip_all_tags( $attrs[ $key ], true );
148
			}
149
		}
150
151
		if ( ! empty( $id3_meta ) ) {
152
			// Before updating metadata, ensure that the item is audio

projects/plugins/jetpack/class.json-api-endpoints.php 1 location

@@ 1926-1930 (lines=5) @@
1923
1924
				$id3_meta = array();
1925
1926
				foreach ( array( 'artist', 'album' ) as $key ) {
1927
					if ( isset( $attrs[ $key ] ) ) {
1928
						$id3_meta[ $key ] = wp_strip_all_tags( $attrs[ $key ], true );
1929
					}
1930
				}
1931
1932
				if ( ! empty( $id3_meta ) ) {
1933
					// Before updating metadata, ensure that the item is audio