Code Duplication    Length = 10-11 lines in 2 locations

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

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