Code Duplication    Length = 5-6 lines in 2 locations

_inc/lib/core-api/class.jetpack-core-api-module-endpoints.php 2 locations

@@ 1026-1031 (lines=6) @@
1023
1024
		$error = array();
1025
1026
		if ( ! empty( $data['siteTitle'] ) ) {
1027
			// If option value was the same, consider it done.
1028
			if ( ! ( update_option( 'blogname', $data['siteTitle'] ) || get_option( 'blogname' ) == $data['siteTitle'] ) ) {
1029
				$error[] = 'siteTitle';
1030
			}
1031
		}
1032
1033
		if ( isset( $data['siteDescription'] ) ) {
1034
			// If option value was the same, consider it done.
@@ 1043-1047 (lines=5) @@
1040
		$site_title = get_option( 'blogname' );
1041
		$author = get_current_user_id() || 1;
1042
1043
		if ( ! empty( $data['siteType'] ) ) {
1044
			if ( ! ( update_option( 'jpo_site_type', $data['siteType'] ) || get_option( 'jpo_site_type' ) == $data['siteType'] ) ) {
1045
				$error[] = 'siteType';
1046
			}
1047
		}
1048
1049
		if ( isset( $data['homepageFormat'] ) ) {
1050
			// If $data['homepageFormat'] is 'posts', we have nothing to do since it's WordPress' default