Code Duplication    Length = 12-14 lines in 2 locations

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

@@ 174-185 (lines=12) @@
171
		}
172
	}
173
174
	public function enqueue() {
175
		wp_enqueue_style( 'calypsoify_wpadminmods_css', plugin_dir_url( __FILE__ ) . 'style.css', false, JETPACK__VERSION );
176
		wp_style_add_data( 'calypsoify_wpadminmods_css', 'rtl', 'replace' );
177
178
		wp_enqueue_script( 'calypsoify_wpadminmods_js', plugin_dir_url( __FILE__ ) . 'mods.js', false, JETPACK__VERSION );
179
		wp_localize_script( 'calypsoify_wpadminmods_js', 'CalypsoifyOpts', array(
180
			'nonces' => array(
181
				'autoupdate_plugins' => wp_create_nonce( 'jetpack_toggle_autoupdate-plugins' ),
182
				'autoupdate_plugins_translations' => wp_create_nonce( 'jetpack_toggle_autoupdate-plugins_translations' ),
183
			)
184
		) );
185
	}
186
187
	public function enqueue_for_gutenberg() {
188
		wp_enqueue_style( 'calypsoify_wpadminmods_css', plugin_dir_url( __FILE__ ) . 'style-gutenberg.css', false, JETPACK__VERSION );
@@ 187-200 (lines=14) @@
184
		) );
185
	}
186
187
	public function enqueue_for_gutenberg() {
188
		wp_enqueue_style( 'calypsoify_wpadminmods_css', plugin_dir_url( __FILE__ ) . 'style-gutenberg.css', false, JETPACK__VERSION );
189
		wp_style_add_data( 'calypsoify_wpadminmods_css', 'rtl', 'replace' );
190
191
		wp_enqueue_script( 'calypsoify_wpadminmods_js', plugin_dir_url( __FILE__ ) . 'mods-gutenberg.js', false, JETPACK__VERSION );
192
		wp_localize_script(
193
			'calypsoify_wpadminmods_js',
194
			'calypsoifyGutenberg',
195
			array(
196
				'closeLabel' => __( 'Close', 'jetpack' ),
197
				'closeUrl'   => $this->get_close_gutenberg_url(),
198
			)
199
		);
200
	}
201
202
	public function insert_sidebar_html() { ?>
203
		<a href="<?php echo esc_url( 'https://wordpress.com/stats/day/' . Jetpack::build_raw_urls( home_url() ) ); ?>" id="calypso-sidebar-header">