Code Duplication    Length = 3-3 lines in 4 locations

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

@@ 1108-1110 (lines=3) @@
1105
			);
1106
		}
1107
1108
		if ( $rewind_data->get_error_code() === 'rewind_data_fetch_failed' ) {
1109
			return new WP_Error( 'rewind_data_fetch_failed', esc_html__( 'Failed fetching rewind data. Try again later.', 'jetpack' ), array( 'status' => 400 ) );
1110
		}
1111
1112
		if ( $rewind_data->get_error_code() === 'site_id_missing' ) {
1113
			return new WP_Error( 'site_id_missing', esc_html__( 'The ID of this site does not exist.', 'jetpack' ), array( 'status' => 404 ) );
@@ 1112-1114 (lines=3) @@
1109
			return new WP_Error( 'rewind_data_fetch_failed', esc_html__( 'Failed fetching rewind data. Try again later.', 'jetpack' ), array( 'status' => 400 ) );
1110
		}
1111
1112
		if ( $rewind_data->get_error_code() === 'site_id_missing' ) {
1113
			return new WP_Error( 'site_id_missing', esc_html__( 'The ID of this site does not exist.', 'jetpack' ), array( 'status' => 404 ) );
1114
		}
1115
1116
		return new WP_Error(
1117
			'error_get_rewind_data',
@@ 1436-1438 (lines=3) @@
1433
				)
1434
			);
1435
		}
1436
		if ( $site_data->get_error_code() === 'site_data_fetch_failed' ) {
1437
			return new WP_Error( 'site_data_fetch_failed', esc_html__( 'Failed fetching site data. Try again later.', 'jetpack' ), array( 'status' => 400 ) );
1438
		}
1439
1440
		if ( $site_data->get_error_code() === 'site_id_missing' ) {
1441
			return new WP_Error( 'site_id_missing', esc_html__( 'The ID of this site does not exist.', 'jetpack' ), array( 'status' => 404 ) );
@@ 1440-1442 (lines=3) @@
1437
			return new WP_Error( 'site_data_fetch_failed', esc_html__( 'Failed fetching site data. Try again later.', 'jetpack' ), array( 'status' => 400 ) );
1438
		}
1439
1440
		if ( $site_data->get_error_code() === 'site_id_missing' ) {
1441
			return new WP_Error( 'site_id_missing', esc_html__( 'The ID of this site does not exist.', 'jetpack' ), array( 'status' => 404 ) );
1442
		}
1443
	}
1444
1445
	/**