Code Duplication    Length = 3-3 lines in 4 locations

_inc/lib/class.core-rest-api-endpoints.php 4 locations

@@ 1061-1063 (lines=3) @@
1058
			);
1059
		}
1060
1061
		if ( $rewind_data->get_error_code() === 'rewind_data_fetch_failed' ) {
1062
			return new WP_Error( 'rewind_data_fetch_failed', esc_html__( 'Failed fetching rewind data. Try again later.', 'jetpack' ), array( 'status' => 400 ) );
1063
		}
1064
1065
		if ( $rewind_data->get_error_code() === 'site_id_missing' ) {
1066
			return new WP_Error( 'site_id_missing', esc_html__( 'The ID of this site does not exist.', 'jetpack' ), array( 'status' => 404 ) );
@@ 1065-1067 (lines=3) @@
1062
			return new WP_Error( 'rewind_data_fetch_failed', esc_html__( 'Failed fetching rewind data. Try again later.', 'jetpack' ), array( 'status' => 400 ) );
1063
		}
1064
1065
		if ( $rewind_data->get_error_code() === 'site_id_missing' ) {
1066
			return new WP_Error( 'site_id_missing', esc_html__( 'The ID of this site does not exist.', 'jetpack' ), array( 'status' => 404 ) );
1067
		}
1068
1069
		return new WP_Error(
1070
			'error_get_rewind_data',
@@ 1356-1358 (lines=3) @@
1353
				)
1354
			);
1355
		}
1356
		if ( $site_data->get_error_code() === 'site_data_fetch_failed' ) {
1357
			return new WP_Error( 'site_data_fetch_failed', esc_html__( 'Failed fetching site data. Try again later.', 'jetpack' ), array( 'status' => 400 ) );
1358
		}
1359
1360
		if ( $site_data->get_error_code() === 'site_id_missing' ) {
1361
			return new WP_Error( 'site_id_missing', esc_html__( 'The ID of this site does not exist.', 'jetpack' ), array( 'status' => 404 ) );
@@ 1360-1362 (lines=3) @@
1357
			return new WP_Error( 'site_data_fetch_failed', esc_html__( 'Failed fetching site data. Try again later.', 'jetpack' ), array( 'status' => 400 ) );
1358
		}
1359
1360
		if ( $site_data->get_error_code() === 'site_id_missing' ) {
1361
			return new WP_Error( 'site_id_missing', esc_html__( 'The ID of this site does not exist.', 'jetpack' ), array( 'status' => 404 ) );
1362
		}
1363
	}
1364
1365
	/**