Code Duplication    Length = 7-12 lines in 2 locations

_inc/lib/admin-pages/class.jetpack-react-page.php 1 location

@@ 139-150 (lines=12) @@
136
		// Try fetching by patch
137
		$static_html = @file_get_contents( JETPACK__PLUGIN_DIR . '_inc/build/static.html' );
138
139
		if ( false === $static_html ) {
140
141
			// If we still have nothing, display an error
142
			echo '<p>';
143
			esc_html_e( 'Error fetching static.html. Try running: ', 'jetpack' );
144
			echo '<code>yarn distclean && yarn build</code>';
145
			echo '</p>';
146
		} else {
147
148
			// We got the static.html so let's display it
149
			echo $static_html;
150
		}
151
	}
152
153
	function get_i18n_data() {

_inc/lib/admin-pages/class.jetpack-settings-page.php 1 location

@@ 26-32 (lines=7) @@
23
		$static_html = @file_get_contents( JETPACK__PLUGIN_DIR . '_inc/build/static.html' );
24
25
		// If static.html isn't there, there's nothing else we can do.
26
		if ( false === $static_html ) {
27
			echo '<p>';
28
			esc_html_e( 'Error fetching static.html. Try running: ', 'jetpack' );
29
			echo '<code>yarn distclean && yarn build</code>';
30
			echo '</p>';
31
			return;
32
		}
33
34
		// We have static.html so let's continue trying to fetch the others
35
		$noscript_notice = @file_get_contents( JETPACK__PLUGIN_DIR . '_inc/build/static-noscript-notice.html' );