Code Duplication    Length = 4-4 lines in 2 locations

projects/plugins/beta/src/class-utils.php 2 locations

@@ 595-598 (lines=4) @@
592
	public static function proceed_to_install( $url, $plugin_folder, $section ) {
593
		$temp_path = download_url( $url );
594
595
		if ( is_wp_error( $temp_path ) ) {
596
			// translators: %1$s: download url, %2$s: error message.
597
			wp_die( wp_kses_post( sprintf( __( 'Error Downloading: <a href="%1$s">%1$s</a> - Error: %2$s', 'jetpack-beta' ), $url, $temp_path->get_error_message() ) ) );
598
		}
599
		require_once ABSPATH . 'wp-admin/includes/file.php';
600
		$creds = request_filesystem_credentials( site_url() . '/wp-admin/', '', false, false, array() );
601
		/* initialize the API */
@@ 616-619 (lines=4) @@
613
614
		$result = unzip_file( $temp_path, $plugin_path );
615
616
		if ( is_wp_error( $result ) ) {
617
			// translators: %1$s: error message.
618
			wp_die( esc_html( sprintf( __( 'Error Unziping file: Error: %1$s', 'jetpack-beta' ), $result->get_error_message() ) ) );
619
		}
620
	}
621
622
	/**