Code Duplication    Length = 5-5 lines in 3 locations

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

@@ 242-246 (lines=5) @@
239
		$publicize_custom_message = isset( $input['publicize_message'] ) ? $input['publicize_message'] : null;
240
		unset( $input['publicize_message'] );
241
242
		if ( isset( $input['featured_image'] ) ) {
243
			$featured_image = trim( $input['featured_image'] );
244
			$delete_featured_image = empty( $featured_image );
245
			unset( $input['featured_image'] );
246
		}
247
248
		$metadata = isset( $input['metadata'] ) ? $input['metadata'] : null;
249
		unset( $input['metadata'] );

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

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

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

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