Code Duplication    Length = 11-11 lines in 2 locations

classes/class-accommodation.php 1 location

@@ 389-399 (lines=11) @@
386
	/**
387
	 * Saves the queue to the option.
388
	 */
389
	public function remove_from_queue($id) {
390
        if (!empty($this->queued_imports)) {
391
392
			if(($key = array_search($id, $this->queued_imports)) !== false) {
393
				unset($this->queued_imports[$key]);
394
395
				delete_option('wetu_importer_que');
396
				update_option('wetu_importer_que',$this->queued_imports);
397
			}
398
        }
399
	}
400
401
	/**
402
	 * Connect to wetu

classes/class-destination.php 1 location

@@ 466-476 (lines=11) @@
463
	/**
464
	 * Saves the queue to the option.
465
	 */
466
	public function remove_from_queue($id) {
467
		if (!empty($this->queued_imports)) {
468
469
			if(($key = array_search($id, $this->queued_imports)) !== false) {
470
				unset($this->queued_imports[$key]);
471
472
				delete_option('wetu_importer_que');
473
				update_option('wetu_importer_que',$this->queued_imports);
474
			}
475
		}
476
	}
477
478
	/**
479
	 * Connect to wetu