Code Duplication    Length = 5-5 lines in 2 locations

class.jetpack-gutenberg.php 2 locations

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