Code Duplication    Length = 9-9 lines in 2 locations

_inc/lib/debugger/debug-functions.php 1 location

@@ 85-93 (lines=9) @@
82
83
				if ( false === $results['pass'] ) {
84
					$return['status'] = $results['severity'];
85
					if ( ! empty( $results['action'] ) ) {
86
						$return['actions'] = sprintf(
87
							'<a href="%1$s" target="_blank" rel="noopener noreferrer">%2$s <span class="screen-reader-text">%3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>',
88
							esc_url( $results['action'] ),
89
							$results['action_label'],
90
							/* translators: accessibility text */
91
							__( '(opens in a new tab)', 'jetpack' )
92
						);
93
					}
94
				}
95
96
				return $return;

_inc/lib/debugger/class-jetpack-cxn-test-base.php 1 location

@@ 468-476 (lines=9) @@
465
					'<p>%s</p>',
466
					$fail['resolution']
467
				);
468
				if ( ! empty( $fail['action'] ) ) {
469
					$result['actions'] = sprintf(
470
						'<a class="button button-primary" href="%1$s" target="_blank" rel="noopener noreferrer">%2$s <span class="screen-reader-text">%3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>',
471
						esc_url( $fail['action'] ),
472
						__( 'Resolve', 'jetpack' ),
473
						/* translators: accessibility text */
474
						__( '(opens in a new tab)', 'jetpack' )
475
					);
476
				}
477
			} else {
478
				$result['description'] .= sprintf(
479
					'<p>%s</p>',