Code Duplication    Length = 3-3 lines in 4 locations

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

@@ 1080-1082 (lines=3) @@
1077
			);
1078
		}
1079
1080
		if ( $rewind_data->get_error_code() === 'rewind_data_fetch_failed' ) {
1081
			return new WP_Error( 'rewind_data_fetch_failed', esc_html__( 'Failed fetching rewind data. Try again later.', 'jetpack' ), array( 'status' => 400 ) );
1082
		}
1083
1084
		if ( $rewind_data->get_error_code() === 'site_id_missing' ) {
1085
			return new WP_Error( 'site_id_missing', esc_html__( 'The ID of this site does not exist.', 'jetpack' ), array( 'status' => 404 ) );
@@ 1084-1086 (lines=3) @@
1081
			return new WP_Error( 'rewind_data_fetch_failed', esc_html__( 'Failed fetching rewind data. Try again later.', 'jetpack' ), array( 'status' => 400 ) );
1082
		}
1083
1084
		if ( $rewind_data->get_error_code() === 'site_id_missing' ) {
1085
			return new WP_Error( 'site_id_missing', esc_html__( 'The ID of this site does not exist.', 'jetpack' ), array( 'status' => 404 ) );
1086
		}
1087
1088
		return new WP_Error(
1089
			'error_get_rewind_data',
@@ 1375-1377 (lines=3) @@
1372
				)
1373
			);
1374
		}
1375
		if ( $site_data->get_error_code() === 'site_data_fetch_failed' ) {
1376
			return new WP_Error( 'site_data_fetch_failed', esc_html__( 'Failed fetching site data. Try again later.', 'jetpack' ), array( 'status' => 400 ) );
1377
		}
1378
1379
		if ( $site_data->get_error_code() === 'site_id_missing' ) {
1380
			return new WP_Error( 'site_id_missing', esc_html__( 'The ID of this site does not exist.', 'jetpack' ), array( 'status' => 404 ) );
@@ 1379-1381 (lines=3) @@
1376
			return new WP_Error( 'site_data_fetch_failed', esc_html__( 'Failed fetching site data. Try again later.', 'jetpack' ), array( 'status' => 400 ) );
1377
		}
1378
1379
		if ( $site_data->get_error_code() === 'site_id_missing' ) {
1380
			return new WP_Error( 'site_id_missing', esc_html__( 'The ID of this site does not exist.', 'jetpack' ), array( 'status' => 404 ) );
1381
		}
1382
	}
1383
1384
	/**