Code Duplication    Length = 5-5 lines in 2 locations

class.jetpack-gutenberg.php 2 locations

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