Code Duplication    Length = 12-14 lines in 2 locations

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

@@ 215-226 (lines=12) @@
212
		}
213
	}
214
215
	public function enqueue() {
216
		wp_enqueue_style( 'calypsoify_wpadminmods_css', plugin_dir_url( __FILE__ ) . 'style.css', false, JETPACK__VERSION );
217
		wp_style_add_data( 'calypsoify_wpadminmods_css', 'rtl', 'replace' );
218
219
		wp_enqueue_script( 'calypsoify_wpadminmods_js', plugin_dir_url( __FILE__ ) . 'mods.js', false, JETPACK__VERSION );
220
		wp_localize_script( 'calypsoify_wpadminmods_js', 'CalypsoifyOpts', array(
221
			'nonces' => array(
222
				'autoupdate_plugins' => wp_create_nonce( 'jetpack_toggle_autoupdate-plugins' ),
223
				'autoupdate_plugins_translations' => wp_create_nonce( 'jetpack_toggle_autoupdate-plugins_translations' ),
224
			)
225
		) );
226
	}
227
228
	public function enqueue_for_gutenberg() {
229
		wp_enqueue_style( 'calypsoify_wpadminmods_css', plugin_dir_url( __FILE__ ) . 'style-gutenberg.css', false, JETPACK__VERSION );
@@ 228-241 (lines=14) @@
225
		) );
226
	}
227
228
	public function enqueue_for_gutenberg() {
229
		wp_enqueue_style( 'calypsoify_wpadminmods_css', plugin_dir_url( __FILE__ ) . 'style-gutenberg.css', false, JETPACK__VERSION );
230
		wp_style_add_data( 'calypsoify_wpadminmods_css', 'rtl', 'replace' );
231
232
		wp_enqueue_script( 'calypsoify_wpadminmods_js', plugin_dir_url( __FILE__ ) . 'mods-gutenberg.js', false, JETPACK__VERSION );
233
		wp_localize_script(
234
			'calypsoify_wpadminmods_js',
235
			'calypsoifyGutenberg',
236
			array(
237
				'closeLabel' => __( 'Close', 'jetpack' ),
238
				'closeUrl'   => $this->get_close_gutenberg_url(),
239
			)
240
		);
241
	}
242
243
	public function insert_sidebar_html() { ?>
244
		<a href="<?php echo esc_url( 'https://wordpress.com/stats/day/' . Jetpack::build_raw_urls( home_url() ) ); ?>" id="calypso-sidebar-header">