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

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