Code Duplication    Length = 10-11 lines in 2 locations

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

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