Code Duplication    Length = 9-10 lines in 2 locations

projects/plugins/jetpack/class-jetpack-wizard-banner.php 1 location

@@ 44-52 (lines=9) @@
41
	/**
42
	 * Initialize hooks to display the banner
43
	 */
44
	public function maybe_initialize_hooks() {
45
		if ( ! $this->can_be_displayed() ) {
46
			return;
47
		}
48
49
		add_action( 'admin_print_styles', array( $this, 'admin_banner_styles' ) );
50
		add_action( 'admin_notices', array( $this, 'render_banner' ) );
51
		add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_banner_scripts' ) );
52
	}
53
54
	/**
55
	 * Can we display the banner?

projects/plugins/jetpack/class-jetpack-recommendations-banner.php 1 location

@@ 44-53 (lines=10) @@
41
	/**
42
	 * Initialize hooks to display the banner
43
	 */
44
	public function maybe_initialize_hooks() {
45
		if ( ! $this->can_be_displayed() ) {
46
			return;
47
		}
48
49
		add_action( 'admin_print_styles', array( $this, 'admin_banner_styles' ) );
50
		add_action( 'admin_notices', array( $this, 'render_banner' ) );
51
		add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_banner_scripts' ) );
52
	}
53
54
	/**
55
	 * Determines if the banner can be displayed
56
	 */