Code Duplication    Length = 10-11 lines in 2 locations

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

@@ 468-478 (lines=11) @@
465
		);
466
		remove_filter( 'http_request_timeout', array( 'Jetpack_Cxn_Tests', 'increase_timeout' ) );
467
468
		if ( is_wp_error( $response ) ) {
469
			return self::failing_test(
470
				array(
471
					'name'              => $name,
472
					/* translators: %1$s is the error code, %2$s is the error message */
473
					'short_description' => sprintf( __( 'Connection test failed (#%1$s: %2$s)', 'jetpack' ), $response->get_error_code(), $response->get_error_message() ),
474
					'action_label'      => $this->helper_get_support_text(),
475
					'action'            => $this->helper_get_support_url(),
476
				)
477
			);
478
		}
479
480
		$body = wp_remote_retrieve_body( $response );
481
		if ( ! $body ) {
@@ 481-490 (lines=10) @@
478
		}
479
480
		$body = wp_remote_retrieve_body( $response );
481
		if ( ! $body ) {
482
			return self::failing_test(
483
				array(
484
					'name'              => $name,
485
					'short_description' => __( 'Connection test failed (empty response body)', 'jetpack' ) . wp_remote_retrieve_response_code( $response ),
486
					'action_label'      => $this->helper_get_support_text(),
487
					'action'            => $this->helper_get_support_url(),
488
				)
489
			);
490
		}
491
492
		if ( 404 === wp_remote_retrieve_response_code( $response ) ) {
493
			return self::skipped_test(