Code Duplication    Length = 5-5 lines in 2 locations

modules/perf/class.jetpack-perf-optimize-assets.php 2 locations

@@ 392-396 (lines=5) @@
389
	 public function register_inline_script( $handle, $file, $plugin_file, $deps = false, $ver = false, $in_footer = false ) {
390
		$registered = wp_register_script( $handle, plugins_url( $file, $plugin_file ), $deps, $ver, $in_footer );
391
392
		if ( $registered ) {
393
			$file_full_path = dirname( $plugin_file ) . '/' . $file;
394
			wp_script_add_data( $handle, 'jetpack-inline', true );
395
			wp_script_add_data( $handle, 'jetpack-inline-file', $file_full_path );
396
		}
397
398
		return $registered;
399
	}
@@ 409-413 (lines=5) @@
406
	public function register_inline_style( $handle, $file, $plugin_file, $deps = array(), $ver = false, $media = 'all' ) {
407
		$registered = wp_register_style( $handle, plugins_url( $file, $plugin_file ), $deps, $ver, $media );
408
409
		if ( $registered ) {
410
			$file_full_path = dirname( $plugin_file ) . '/' . $file;
411
			wp_style_add_data( $handle, 'jetpack-inline', true );
412
			wp_style_add_data( $handle, 'jetpack-inline-file', $file_full_path );
413
		}
414
	}
415
}
416