Code Duplication    Length = 14-14 lines in 2 locations

packages/options/src/Manager.php 1 location

@@ 279-292 (lines=14) @@
276
	 *
277
	 * @return bool
278
	 */
279
	function bypass_raw_option( $name ) {
280
		if ( \Jetpack_Constants::get_constant( 'JETPACK_DISABLE_RAW_OPTIONS' ) ) {
281
			return true;
282
		}
283
		/**
284
		 * Allows to disable particular raw options.
285
		 *
286
		 * @since 5.5.0
287
		 *
288
		 * @param array $disabled_raw_options An array of option names that you can selectively blacklist from being managed via direct database queries.
289
		 */
290
		$disabled_raw_options = apply_filters( 'jetpack_disabled_raw_options', array() );
291
		return isset( $disabled_raw_options[ $name ] );
292
	}
293
}
294

class.jetpack-options.php 1 location

@@ 481-494 (lines=14) @@
478
	 *
479
	 * @return bool
480
	 */
481
	static function bypass_raw_option( $name ) {
482
483
		if ( Jetpack_Constants::get_constant( 'JETPACK_DISABLE_RAW_OPTIONS' ) ) {
484
			return true;
485
		}
486
		/**
487
		 * Allows to disable particular raw options.
488
		 * @since 5.5.0
489
		 *
490
		 * @param array $disabled_raw_options An array of option names that you can selectively blacklist from being managed via direct database queries.
491
		 */
492
		$disabled_raw_options = apply_filters( 'jetpack_disabled_raw_options', array() );
493
		return isset( $disabled_raw_options[ $name ] );
494
	}
495
496
	/**
497
	 * Gets all known options that are used by Jetpack and managed by Jetpack_Options.