Code Duplication    Length = 5-5 lines in 3 locations

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

@@ 441-445 (lines=5) @@
438
		$publicize_custom_message = isset( $input['publicize_message'] ) ? $input['publicize_message'] : null;
439
		unset( $input['publicize_message'] );
440
441
		if ( isset( $input['featured_image'] ) ) {
442
			$featured_image = trim( $input['featured_image'] );
443
			$delete_featured_image = empty( $featured_image );
444
			unset( $input['featured_image'] );
445
		}
446
447
		$metadata = isset( $input['metadata'] ) ? $input['metadata'] : null;
448
		unset( $input['metadata'] );

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

@@ 497-501 (lines=5) @@
494
		$publicize_custom_message = isset( $input['publicize_message'] ) ? $input['publicize_message'] : null;
495
		unset( $input['publicize_message'] );
496
497
		if ( isset( $input['featured_image'] ) ) {
498
			$featured_image = trim( $input['featured_image'] );
499
			$delete_featured_image = empty( $featured_image );
500
			unset( $input['featured_image'] );
501
		}
502
503
		$metadata = isset( $input['metadata'] ) ? $input['metadata'] : null;
504
		unset( $input['metadata'] );

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

@@ 468-472 (lines=5) @@
465
		$publicize_custom_message = isset( $input['publicize_message'] ) ? $input['publicize_message'] : null;
466
		unset( $input['publicize_message'] );
467
468
		if ( isset( $input['featured_image'] ) ) {
469
			$featured_image = trim( $input['featured_image'] );
470
			$delete_featured_image = empty( $featured_image );
471
			unset( $input['featured_image'] );
472
		}
473
474
		$metadata = isset( $input['metadata'] ) ? $input['metadata'] : null;
475
		unset( $input['metadata'] );