Code Duplication    Length = 9-9 lines in 2 locations

projects/plugins/jetpack/class-jetpack-recommendations-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
	 * Determines if the banner can be displayed

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

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