Code Duplication    Length = 10-11 lines in 2 locations

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

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