Code Duplication    Length = 17-17 lines in 2 locations

projects/packages/identity-crisis/src/class-identity-crisis.php 1 location

@@ 248-264 (lines=17) @@
245
	 *
246
	 * @return void
247
	 */
248
	public static function clear_all_idc_options() {
249
		// If the site is currently in IDC, let's also clear the VaultPress connection options.
250
		// We have to check if the site is in IDC, otherwise we'd be clearing the VaultPress
251
		// connection any time the Jetpack connection is cycled.
252
		if ( self::validate_sync_error_idc_option() ) {
253
			delete_option( 'vaultpress' );
254
			delete_option( 'vaultpress_auto_register' );
255
		}
256
257
		Jetpack_Options::delete_option(
258
			array(
259
				'sync_error_idc',
260
				'safe_mode_confirmed',
261
				'migrate_for_idc',
262
			)
263
		);
264
	}
265
266
	/**
267
	 * Checks whether the sync_error_idc option is valid or not, and if not, will do cleanup.

projects/plugins/jetpack/class.jetpack-idc.php 1 location

@@ 177-193 (lines=17) @@
174
	/**
175
	 * Clears all IDC specific options. This method is used on disconnect and reconnect.
176
	 */
177
	static function clear_all_idc_options() {
178
		// If the site is currently in IDC, let's also clear the VaultPress connection options.
179
		// We have to check if the site is in IDC, otherwise we'd be clearing the VaultPress
180
		// connection any time the Jetpack connection is cycled.
181
		if ( Jetpack::validate_sync_error_idc_option() ) {
182
			delete_option( 'vaultpress' );
183
			delete_option( 'vaultpress_auto_register' );
184
		}
185
186
		Jetpack_Options::delete_option(
187
			array(
188
				'sync_error_idc',
189
				'safe_mode_confirmed',
190
				'migrate_for_idc',
191
			)
192
		);
193
	}
194
195
	/**
196
	 * Does the current admin page have help tabs?