Code Duplication    Length = 10-11 lines in 2 locations

_inc/lib/debugger/class-jetpack-cxn-tests.php 2 locations

@@ 380-390 (lines=11) @@
377
		);
378
		remove_filter( 'http_request_timeout', array( 'Jetpack_Cxn_Tests', 'increase_timeout' ) );
379
380
		if ( is_wp_error( $response ) ) {
381
			return self::failing_test(
382
				array(
383
					'name'              => $name,
384
					/* translators: %1$s is the error code, %2$s is the error message */
385
					'short_description' => sprintf( __( 'Connection test failed (#%1$s: %2$s)', 'jetpack' ), $response->get_error_code(), $response->get_error_message() ),
386
					'action_label'      => $this->helper_get_support_text(),
387
					'action'            => $this->helper_get_support_url(),
388
				)
389
			);
390
		}
391
392
		$body = wp_remote_retrieve_body( $response );
393
		if ( ! $body ) {
@@ 393-402 (lines=10) @@
390
		}
391
392
		$body = wp_remote_retrieve_body( $response );
393
		if ( ! $body ) {
394
			return self::failing_test(
395
				array(
396
					'name'              => $name,
397
					'short_description' => __( 'Connection test failed (empty response body)', 'jetpack' ) . wp_remote_retrieve_response_code( $response ),
398
					'action_label'      => $this->helper_get_support_text(),
399
					'action'            => $this->helper_get_support_url(),
400
				)
401
			);
402
		}
403
404
		if ( 404 === wp_remote_retrieve_response_code( $response ) ) {
405
			return self::skipped_test(