Code Duplication    Length = 10-11 lines in 2 locations

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

@@ 423-433 (lines=11) @@
420
		);
421
		remove_filter( 'http_request_timeout', array( 'Jetpack_Cxn_Tests', 'increase_timeout' ) );
422
423
		if ( is_wp_error( $response ) ) {
424
			return self::failing_test(
425
				array(
426
					'name'              => $name,
427
					/* translators: %1$s is the error code, %2$s is the error message */
428
					'short_description' => sprintf( __( 'Connection test failed (#%1$s: %2$s)', 'jetpack' ), $response->get_error_code(), $response->get_error_message() ),
429
					'action_label'      => $this->helper_get_support_text(),
430
					'action'            => $this->helper_get_support_url(),
431
				)
432
			);
433
		}
434
435
		$body = wp_remote_retrieve_body( $response );
436
		if ( ! $body ) {
@@ 436-445 (lines=10) @@
433
		}
434
435
		$body = wp_remote_retrieve_body( $response );
436
		if ( ! $body ) {
437
			return self::failing_test(
438
				array(
439
					'name'              => $name,
440
					'short_description' => __( 'Connection test failed (empty response body)', 'jetpack' ) . wp_remote_retrieve_response_code( $response ),
441
					'action_label'      => $this->helper_get_support_text(),
442
					'action'            => $this->helper_get_support_url(),
443
				)
444
			);
445
		}
446
447
		if ( 404 === wp_remote_retrieve_response_code( $response ) ) {
448
			return self::skipped_test(