Code Duplication    Length = 12-12 lines in 2 locations

classes/class-lsx-wetu-importer-accommodation.php 1 location

@@ 247-258 (lines=12) @@
244
	/**
245
	 * Save the list of Accommodation into an option
246
	 */
247
	public function update_options() {
248
		$data = file_get_contents( $this->url . '/List?' . $this->url_qs );
249
250
		$accommodation = json_decode( $data, true );
251
252
		if ( isset( $accommodation['error'] ) ) {
253
			return $accommodation['error'];
254
		} elseif ( isset( $accommodation ) && ! empty( $accommodation ) ) {
255
			set_transient( 'lsx_ti_accommodation',$accommodation,60 * 60 * 2 );
256
			return true;
257
		}
258
	}
259
260
	/**
261
	 * Run through the accommodation grabbed from the DB.

classes/class-lsx-wetu-importer-destination.php 1 location

@@ 740-751 (lines=12) @@
737
	/**
738
	 * Save the list of Accommodation into an option
739
	 */
740
	public function update_options() {
741
		$data = file_get_contents( $this->url . '/List?' . $this->url_qs );
742
743
		$accommodation = json_decode( $data, true );
744
745
		if ( isset( $accommodation['error'] ) ) {
746
			return $accommodation['error'];
747
		} elseif ( isset( $accommodation ) && ! empty( $accommodation ) ) {
748
			set_transient( 'lsx_ti_accommodation', $accommodation,60 * 60 * 2 );
749
			return true;
750
		}
751
	}
752
753
	/**
754
	 * search_form