Code Duplication    Length = 14-19 lines in 2 locations

includes/admin/class-wc-stripe-inbox-notes.php 2 locations

@@ 89-107 (lines=19) @@
86
	/**
87
	 * If conditions are right, show note promoting Apple Pay marketing guide.
88
	 */
89
	public static function create_marketing_note() {
90
		// Make sure conditions for this note still hold.
91
		if ( ! self::should_show_marketing_note() ) {
92
			return;
93
		}
94
95
		$note = new WC_Admin_Note();
96
		$note->set_title( __( 'Boost sales this holiday season with Apple Pay!', 'woocommerce-gateway-stripe' ) );
97
		$note->set_content( __( 'Now that you accept Apple Pay® with Stripe, you can increase conversion rates by letting your customers know that Apple Pay is available. Here’s a marketing guide to help you get started.', 'woocommerce-gateway-stripe' ) );
98
		$note->set_type( WC_Admin_Note::E_WC_ADMIN_NOTE_MARKETING );
99
		$note->set_name( self::SUCCESS_NOTE_NAME );
100
		$note->set_source( 'woocommerce-gateway-stripe' );
101
		$note->add_action(
102
			'marketing-guide',
103
			__( 'See marketing guide', 'woocommerce-gateway-stripe' ),
104
			'https://developer.apple.com/apple-pay/marketing/'
105
		);
106
		$note->save();
107
	}
108
109
	/**
110
	 * Show note indicating domain verification failure.
@@ 112-125 (lines=14) @@
109
	/**
110
	 * Show note indicating domain verification failure.
111
	 */
112
	public static function create_failure_note() {
113
		$note = new WC_Admin_Note();
114
		$note->set_title( __( 'Apple Pay domain verification needed', 'woocommerce-gateway-stripe' ) );
115
		$note->set_content( __( 'The WooCommerce Stripe Gateway extension attempted to perform domain verification on behalf of your store, but was unable to do so. This must be resolved before Apple Pay can be offered to your customers.', 'woocommerce-gateway-stripe' ) );
116
		$note->set_type( WC_Admin_Note::E_WC_ADMIN_NOTE_INFORMATIONAL );
117
		$note->set_name( self::FAILURE_NOTE_NAME );
118
		$note->set_source( 'woocommerce-gateway-stripe' );
119
		$note->add_action(
120
			'learn-more',
121
			__( 'Learn more', 'woocommerce-gateway-stripe' ),
122
			'https://docs.woocommerce.com/document/stripe/#apple-pay'
123
		);
124
		$note->save();
125
	}
126
}
127
128
new WC_Stripe_Inbox_Notes();