Code Duplication    Length = 5-5 lines in 3 locations

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

@@ 262-266 (lines=5) @@
259
		$publicize_custom_message = isset( $input['publicize_message'] ) ? $input['publicize_message'] : null;
260
		unset( $input['publicize_message'] );
261
262
		if ( isset( $input['featured_image'] ) ) {
263
			$featured_image = trim( $input['featured_image'] );
264
			$delete_featured_image = empty( $featured_image );
265
			unset( $input['featured_image'] );
266
		}
267
268
		$metadata = isset( $input['metadata'] ) ? $input['metadata'] : null;
269
		unset( $input['metadata'] );

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

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

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

@@ 262-266 (lines=5) @@
259
		$publicize_custom_message = isset( $input['publicize_message'] ) ? $input['publicize_message'] : null;
260
		unset( $input['publicize_message'] );
261
262
		if ( isset( $input['featured_image'] ) ) {
263
			$featured_image = trim( $input['featured_image'] );
264
			$delete_featured_image = empty( $featured_image );
265
			unset( $input['featured_image'] );
266
		}
267
268
		$metadata = isset( $input['metadata'] ) ? $input['metadata'] : null;
269
		unset( $input['metadata'] );