Code Duplication    Length = 3-3 lines in 4 locations

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

@@ 693-695 (lines=3) @@
690
			);
691
		}
692
693
		if ( $rewind_data->get_error_code() === 'rewind_data_fetch_failed' ) {
694
			return new WP_Error( 'rewind_data_fetch_failed', esc_html__( 'Failed fetching rewind data. Try again later.', 'jetpack' ), array( 'status' => 400 ) );
695
		}
696
697
		if ( $rewind_data->get_error_code() === 'site_id_missing' ) {
698
			return new WP_Error( 'site_id_missing', esc_html__( 'The ID of this site does not exist.', 'jetpack' ), array( 'status' => 404 ) );
@@ 697-699 (lines=3) @@
694
			return new WP_Error( 'rewind_data_fetch_failed', esc_html__( 'Failed fetching rewind data. Try again later.', 'jetpack' ), array( 'status' => 400 ) );
695
		}
696
697
		if ( $rewind_data->get_error_code() === 'site_id_missing' ) {
698
			return new WP_Error( 'site_id_missing', esc_html__( 'The ID of this site does not exist.', 'jetpack' ), array( 'status' => 404 ) );
699
		}
700
701
		return new WP_Error(
702
			'error_get_rewind_data',
@@ 910-912 (lines=3) @@
907
				)
908
			);
909
		}
910
		if ( $site_data->get_error_code() === 'site_data_fetch_failed' ) {
911
			return new WP_Error( 'site_data_fetch_failed', esc_html__( 'Failed fetching site data. Try again later.', 'jetpack' ), array( 'status' => 400 ) );
912
		}
913
914
		if ( $site_data->get_error_code() === 'site_id_missing' ) {
915
			return new WP_Error( 'site_id_missing', esc_html__( 'The ID of this site does not exist.', 'jetpack' ), array( 'status' => 404 ) );
@@ 914-916 (lines=3) @@
911
			return new WP_Error( 'site_data_fetch_failed', esc_html__( 'Failed fetching site data. Try again later.', 'jetpack' ), array( 'status' => 400 ) );
912
		}
913
914
		if ( $site_data->get_error_code() === 'site_id_missing' ) {
915
			return new WP_Error( 'site_id_missing', esc_html__( 'The ID of this site does not exist.', 'jetpack' ), array( 'status' => 404 ) );
916
		}
917
	}
918
919
	/**