Code Duplication    Length = 5-5 lines in 2 locations

class.jetpack-gutenberg.php 2 locations

@@ 207-211 (lines=5) @@
204
		$type = sanitize_title_with_dashes( $type );
205
		// Enqueue styles.
206
		$style_relative_path = '_inc/blocks/' . $type . '/view' . ( is_rtl() ? '.rtl' : '' ) . '.css';
207
		if ( self::block_has_asset( $style_relative_path ) ) {
208
			$style_version = self::get_asset_version( $style_relative_path );
209
			$view_style    = plugins_url( $style_relative_path, JETPACK__PLUGIN_DIR );
210
			wp_enqueue_style( 'jetpack-block-' . $type, $view_style, array(), $style_version );
211
		}
212
213
		// Enqueue script.
214
		$script_relative_path = '_inc/blocks/' . $type . '/view.js';
@@ 215-219 (lines=5) @@
212
213
		// Enqueue script.
214
		$script_relative_path = '_inc/blocks/' . $type . '/view.js';
215
		if ( self::block_has_asset( $script_relative_path ) ) {
216
			$script_version = self::get_asset_version( $script_relative_path );
217
			$view_script    = plugins_url( $script_relative_path, JETPACK__PLUGIN_FILE );
218
			wp_enqueue_script( 'jetpack-block-' . $type, $view_script, array(), $script_version, false );
219
		}
220
	}
221
222
	/**