Code Duplication    Length = 3-3 lines in 4 locations

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

@@ 1347-1349 (lines=3) @@
1344
				)
1345
			);
1346
		}
1347
		if ( $site_data->get_error_code() === 'site_data_fetch_failed' ) {
1348
			return new WP_Error( 'site_data_fetch_failed', esc_html__( 'Failed fetching site data. Try again later.', 'jetpack' ), array( 'status' => 400 ) );
1349
		}
1350
1351
		if ( $site_data->get_error_code() === 'site_id_missing' ) {
1352
			return new WP_Error( 'site_id_missing', esc_html__( 'The ID of this site does not exist.', 'jetpack' ), array( 'status' => 404 ) );
@@ 1351-1353 (lines=3) @@
1348
			return new WP_Error( 'site_data_fetch_failed', esc_html__( 'Failed fetching site data. Try again later.', 'jetpack' ), array( 'status' => 400 ) );
1349
		}
1350
1351
		if ( $site_data->get_error_code() === 'site_id_missing' ) {
1352
			return new WP_Error( 'site_id_missing', esc_html__( 'The ID of this site does not exist.', 'jetpack' ), array( 'status' => 404 ) );
1353
		}
1354
	}
1355
1356
	/**
@@ 1052-1054 (lines=3) @@
1049
			);
1050
		}
1051
1052
		if ( $rewind_data->get_error_code() === 'rewind_data_fetch_failed' ) {
1053
			return new WP_Error( 'rewind_data_fetch_failed', esc_html__( 'Failed fetching rewind data. Try again later.', 'jetpack' ), array( 'status' => 400 ) );
1054
		}
1055
1056
		if ( $rewind_data->get_error_code() === 'site_id_missing' ) {
1057
			return new WP_Error( 'site_id_missing', esc_html__( 'The ID of this site does not exist.', 'jetpack' ), array( 'status' => 404 ) );
@@ 1056-1058 (lines=3) @@
1053
			return new WP_Error( 'rewind_data_fetch_failed', esc_html__( 'Failed fetching rewind data. Try again later.', 'jetpack' ), array( 'status' => 400 ) );
1054
		}
1055
1056
		if ( $rewind_data->get_error_code() === 'site_id_missing' ) {
1057
			return new WP_Error( 'site_id_missing', esc_html__( 'The ID of this site does not exist.', 'jetpack' ), array( 'status' => 404 ) );
1058
		}
1059
1060
		return new WP_Error(
1061
			'error_get_rewind_data',