Code Duplication    Length = 5-5 lines in 3 locations

json-endpoints/class.wpcom-json-api-update-post-endpoint.php 1 location

@@ 252-256 (lines=5) @@
249
		$publicize_custom_message = isset( $input['publicize_message'] ) ? $input['publicize_message'] : null;
250
		unset( $input['publicize_message'] );
251
252
		if ( isset( $input['featured_image'] ) ) {
253
			$featured_image = trim( $input['featured_image'] );
254
			$delete_featured_image = empty( $featured_image );
255
			unset( $input['featured_image'] );
256
		}
257
258
		$metadata = isset( $input['metadata'] ) ? $input['metadata'] : null;
259
		unset( $input['metadata'] );

json-endpoints/class.wpcom-json-api-update-post-v1-1-endpoint.php 1 location

@@ 302-306 (lines=5) @@
299
		$publicize_custom_message = isset( $input['publicize_message'] ) ? $input['publicize_message'] : null;
300
		unset( $input['publicize_message'] );
301
302
		if ( isset( $input['featured_image'] ) ) {
303
			$featured_image = trim( $input['featured_image'] );
304
			$delete_featured_image = empty( $featured_image );
305
			unset( $input['featured_image'] );
306
		}
307
308
		$metadata = isset( $input['metadata'] ) ? $input['metadata'] : null;
309
		unset( $input['metadata'] );

json-endpoints/class.wpcom-json-api-update-post-v1-2-endpoint.php 1 location

@@ 303-307 (lines=5) @@
300
		$publicize_custom_message = isset( $input['publicize_message'] ) ? $input['publicize_message'] : null;
301
		unset( $input['publicize_message'] );
302
303
		if ( isset( $input['featured_image'] ) ) {
304
			$featured_image = trim( $input['featured_image'] );
305
			$delete_featured_image = empty( $featured_image );
306
			unset( $input['featured_image'] );
307
		}
308
309
		$metadata = isset( $input['metadata'] ) ? $input['metadata'] : null;
310
		unset( $input['metadata'] );