Code Duplication    Length = 3-3 lines in 4 locations

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

@@ 1071-1073 (lines=3) @@
1068
			);
1069
		}
1070
1071
		if ( $rewind_data->get_error_code() === 'rewind_data_fetch_failed' ) {
1072
			return new WP_Error( 'rewind_data_fetch_failed', esc_html__( 'Failed fetching rewind data. Try again later.', 'jetpack' ), array( 'status' => 400 ) );
1073
		}
1074
1075
		if ( $rewind_data->get_error_code() === 'site_id_missing' ) {
1076
			return new WP_Error( 'site_id_missing', esc_html__( 'The ID of this site does not exist.', 'jetpack' ), array( 'status' => 404 ) );
@@ 1075-1077 (lines=3) @@
1072
			return new WP_Error( 'rewind_data_fetch_failed', esc_html__( 'Failed fetching rewind data. Try again later.', 'jetpack' ), array( 'status' => 400 ) );
1073
		}
1074
1075
		if ( $rewind_data->get_error_code() === 'site_id_missing' ) {
1076
			return new WP_Error( 'site_id_missing', esc_html__( 'The ID of this site does not exist.', 'jetpack' ), array( 'status' => 404 ) );
1077
		}
1078
1079
		return new WP_Error(
1080
			'error_get_rewind_data',
@@ 1366-1368 (lines=3) @@
1363
				)
1364
			);
1365
		}
1366
		if ( $site_data->get_error_code() === 'site_data_fetch_failed' ) {
1367
			return new WP_Error( 'site_data_fetch_failed', esc_html__( 'Failed fetching site data. Try again later.', 'jetpack' ), array( 'status' => 400 ) );
1368
		}
1369
1370
		if ( $site_data->get_error_code() === 'site_id_missing' ) {
1371
			return new WP_Error( 'site_id_missing', esc_html__( 'The ID of this site does not exist.', 'jetpack' ), array( 'status' => 404 ) );
@@ 1370-1372 (lines=3) @@
1367
			return new WP_Error( 'site_data_fetch_failed', esc_html__( 'Failed fetching site data. Try again later.', 'jetpack' ), array( 'status' => 400 ) );
1368
		}
1369
1370
		if ( $site_data->get_error_code() === 'site_id_missing' ) {
1371
			return new WP_Error( 'site_id_missing', esc_html__( 'The ID of this site does not exist.', 'jetpack' ), array( 'status' => 404 ) );
1372
		}
1373
	}
1374
1375
	/**