Code Duplication    Length = 11-11 lines in 2 locations

modules/protect.php 2 locations

@@ 759-769 (lines=11) @@
756
	 *
757
	 * @return bool true if successful, false otherwise
758
	 */
759
	function delete_transient( $transient ) {
760
		if ( is_multisite() && ! is_main_site() ) {
761
			switch_to_blog( $this->get_main_blog_id() );
762
			$return = delete_transient( $transient );
763
			restore_current_blog();
764
765
			return $return;
766
		}
767
768
		return delete_transient( $transient );
769
	}
770
771
	/**
772
	 * Wrapper for WordPress get_transient function, our version gets
@@ 779-789 (lines=11) @@
776
	 *
777
	 * @return mixed Value of transient.
778
	 */
779
	function get_transient( $transient ) {
780
		if ( is_multisite() && ! is_main_site() ) {
781
			switch_to_blog( $this->get_main_blog_id() );
782
			$return = get_transient( $transient );
783
			restore_current_blog();
784
785
			return $return;
786
		}
787
788
		return get_transient( $transient );
789
	}
790
791
	function get_api_host() {
792
		if ( isset( $this->api_endpoint ) ) {