Code Duplication    Length = 4-4 lines in 2 locations

projects/plugins/beta/class-jetpack-beta.php 2 locations

@@ 996-999 (lines=4) @@
993
	public static function proceed_to_install( $url, $plugin_folder = JETPACK_DEV_PLUGIN_SLUG, $section ) {
994
		$temp_path = download_url( $url );
995
996
		if ( is_wp_error( $temp_path ) ) {
997
			// translators: %1$s: download url, %2$s: error message.
998
			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() ) ) );
999
		}
1000
		require_once ABSPATH . 'wp-admin/includes/file.php';
1001
		$creds = request_filesystem_credentials( site_url() . '/wp-admin/', '', false, false, array() );
1002
		/* initialize the API */
@@ 1017-1020 (lines=4) @@
1014
1015
		$result = unzip_file( $temp_path, $plugin_path );
1016
1017
		if ( is_wp_error( $result ) ) {
1018
			// translators: %1$s: error message.
1019
			wp_die( esc_html( sprintf( __( 'Error Unziping file: Error: %1$s', 'jetpack-beta' ), $result->get_error_message() ) ) );
1020
		}
1021
	}
1022
1023
	/**