Code Duplication    Length = 5-5 lines in 2 locations

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

@@ 484-488 (lines=5) @@
481
	 public function register_inline_script( $handle, $file, $plugin_file, $deps = false, $ver = false, $in_footer = false ) {
482
		$registered = wp_register_script( $handle, plugins_url( $file, $plugin_file ), $deps, $ver, $in_footer );
483
484
		if ( $registered ) {
485
			$file_full_path = dirname( $plugin_file ) . '/' . $file;
486
			wp_script_add_data( $handle, 'jetpack-inline', true );
487
			wp_script_add_data( $handle, 'jetpack-inline-file', $file_full_path );
488
		}
489
490
		return $registered;
491
	}
@@ 501-505 (lines=5) @@
498
	public function register_inline_style( $handle, $file, $plugin_file, $deps = array(), $ver = false, $media = 'all' ) {
499
		$registered = wp_register_style( $handle, plugins_url( $file, $plugin_file ), $deps, $ver, $media );
500
501
		if ( $registered ) {
502
			$file_full_path = dirname( $plugin_file ) . '/' . $file;
503
			wp_style_add_data( $handle, 'jetpack-inline', true );
504
			wp_style_add_data( $handle, 'jetpack-inline-file', $file_full_path );
505
		}
506
	}
507
}
508