Code Duplication    Length = 18-18 lines in 2 locations

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

@@ 6328-6345 (lines=18) @@
6325
	 * @since 4.3.2
6326
	 * @return bool
6327
	 */
6328
	public static function sync_idc_optin() {
6329
		if ( Constants::is_defined( 'JETPACK_SYNC_IDC_OPTIN' ) ) {
6330
			$default = Constants::get_constant( 'JETPACK_SYNC_IDC_OPTIN' );
6331
		} else {
6332
			$default = ! Constants::is_defined( 'SUNRISE' ) && ! is_multisite();
6333
		}
6334
6335
		/**
6336
		 * Allows sites to opt in for IDC mitigation which blocks the site from syncing to WordPress.com when the home
6337
		 * URL or site URL do not match what WordPress.com expects. The default value is either true, or the value of
6338
		 * JETPACK_SYNC_IDC_OPTIN constant if set.
6339
		 *
6340
		 * @since 4.3.2
6341
		 *
6342
		 * @param bool $default Whether the site is opted in to IDC mitigation.
6343
		 */
6344
		return (bool) apply_filters( 'jetpack_sync_idc_optin', $default );
6345
	}
6346
6347
	/**
6348
	 * Maybe Use a .min.css stylesheet, maybe not.

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

@@ 394-411 (lines=18) @@
391
	 * @return bool
392
	 * @since 1.0.0
393
	 */
394
	public static function sync_idc_optin() {
395
		if ( Constants::is_defined( 'JETPACK_SYNC_IDC_OPTIN' ) ) {
396
			$default = Constants::get_constant( 'JETPACK_SYNC_IDC_OPTIN' );
397
		} else {
398
			$default = ! Constants::is_defined( 'SUNRISE' ) && ! is_multisite();
399
		}
400
401
		/**
402
		 * Allows sites to opt in for IDC mitigation which blocks the site from syncing to WordPress.com when the home
403
		 * URL or site URL do not match what WordPress.com expects. The default value is either true, or the value of
404
		 * JETPACK_SYNC_IDC_OPTIN constant if set.
405
		 *
406
		 * @param bool $default Whether the site is opted in to IDC mitigation.
407
		 *
408
		 * @since 1.0.0
409
		 */
410
		return (bool) apply_filters( 'jetpack_sync_idc_optin', $default );
411
	}
412
413
	/**
414
	 * Does the current admin page have help tabs?