Code Duplication    Length = 12-14 lines in 2 locations

modules/calypsoify/class.jetpack-calypsoify.php 2 locations

@@ 229-240 (lines=12) @@
226
		}
227
	}
228
229
	public function enqueue() {
230
		wp_enqueue_style( 'calypsoify_wpadminmods_css', plugin_dir_url( __FILE__ ) . 'style.css', false, JETPACK__VERSION );
231
		wp_style_add_data( 'calypsoify_wpadminmods_css', 'rtl', 'replace' );
232
233
		wp_enqueue_script( 'calypsoify_wpadminmods_js', plugin_dir_url( __FILE__ ) . 'mods.js', false, JETPACK__VERSION );
234
		wp_localize_script( 'calypsoify_wpadminmods_js', 'CalypsoifyOpts', array(
235
			'nonces' => array(
236
				'autoupdate_plugins' => wp_create_nonce( 'jetpack_toggle_autoupdate-plugins' ),
237
				'autoupdate_plugins_translations' => wp_create_nonce( 'jetpack_toggle_autoupdate-plugins_translations' ),
238
			)
239
		) );
240
	}
241
242
	public function enqueue_for_gutenberg() {
243
		wp_enqueue_style( 'calypsoify_wpadminmods_css', plugin_dir_url( __FILE__ ) . 'style-gutenberg.css', false, JETPACK__VERSION );
@@ 242-255 (lines=14) @@
239
		) );
240
	}
241
242
	public function enqueue_for_gutenberg() {
243
		wp_enqueue_style( 'calypsoify_wpadminmods_css', plugin_dir_url( __FILE__ ) . 'style-gutenberg.css', false, JETPACK__VERSION );
244
		wp_style_add_data( 'calypsoify_wpadminmods_css', 'rtl', 'replace' );
245
246
		wp_enqueue_script( 'calypsoify_wpadminmods_js', plugin_dir_url( __FILE__ ) . 'mods-gutenberg.js', false, JETPACK__VERSION );
247
		wp_localize_script(
248
			'calypsoify_wpadminmods_js',
249
			'calypsoifyGutenberg',
250
			array(
251
				'closeLabel' => __( 'Close', 'jetpack' ),
252
				'closeUrl'   => $this->get_close_gutenberg_url(),
253
			)
254
		);
255
	}
256
257
	public function insert_sidebar_html() { ?>
258
		<a href="<?php echo esc_url( 'https://wordpress.com/stats/day/' . Jetpack::build_raw_urls( home_url() ) ); ?>" id="calypso-sidebar-header">