Code Duplication    Length = 3-3 lines in 4 locations

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

@@ 762-764 (lines=3) @@
759
			);
760
		}
761
762
		if ( $rewind_data->get_error_code() === 'rewind_data_fetch_failed' ) {
763
			return new WP_Error( 'rewind_data_fetch_failed', esc_html__( 'Failed fetching rewind data. Try again later.', 'jetpack' ), array( 'status' => 400 ) );
764
		}
765
766
		if ( $rewind_data->get_error_code() === 'site_id_missing' ) {
767
			return new WP_Error( 'site_id_missing', esc_html__( 'The ID of this site does not exist.', 'jetpack' ), array( 'status' => 404 ) );
@@ 766-768 (lines=3) @@
763
			return new WP_Error( 'rewind_data_fetch_failed', esc_html__( 'Failed fetching rewind data. Try again later.', 'jetpack' ), array( 'status' => 400 ) );
764
		}
765
766
		if ( $rewind_data->get_error_code() === 'site_id_missing' ) {
767
			return new WP_Error( 'site_id_missing', esc_html__( 'The ID of this site does not exist.', 'jetpack' ), array( 'status' => 404 ) );
768
		}
769
770
		return new WP_Error(
771
			'error_get_rewind_data',
@@ 1060-1062 (lines=3) @@
1057
				)
1058
			);
1059
		}
1060
		if ( $site_data->get_error_code() === 'site_data_fetch_failed' ) {
1061
			return new WP_Error( 'site_data_fetch_failed', esc_html__( 'Failed fetching site data. Try again later.', 'jetpack' ), array( 'status' => 400 ) );
1062
		}
1063
1064
		if ( $site_data->get_error_code() === 'site_id_missing' ) {
1065
			return new WP_Error( 'site_id_missing', esc_html__( 'The ID of this site does not exist.', 'jetpack' ), array( 'status' => 404 ) );
@@ 1064-1066 (lines=3) @@
1061
			return new WP_Error( 'site_data_fetch_failed', esc_html__( 'Failed fetching site data. Try again later.', 'jetpack' ), array( 'status' => 400 ) );
1062
		}
1063
1064
		if ( $site_data->get_error_code() === 'site_id_missing' ) {
1065
			return new WP_Error( 'site_id_missing', esc_html__( 'The ID of this site does not exist.', 'jetpack' ), array( 'status' => 404 ) );
1066
		}
1067
	}
1068
1069
	/**