Code Duplication    Length = 11-11 lines in 2 locations

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

@@ 432-442 (lines=11) @@
429
	/**
430
	 * Saves the queue to the option.
431
	 */
432
	public function remove_from_queue( $id ) {
433
		if ( ! empty( $this->queued_imports ) ) {
434
			// @codingStandardsIgnoreLine
435
			if ( ( $key = array_search( $id, $this->queued_imports ) ) !== false ) {
436
				unset( $this->queued_imports[ $key ] );
437
438
				delete_option( 'wetu_importer_que' );
439
				update_option( 'wetu_importer_que',$this->queued_imports );
440
			}
441
		}
442
	}
443
444
	/**
445
	 * Connect to wetu

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

@@ 549-559 (lines=11) @@
546
	/**
547
	 * Saves the queue to the option.
548
	 */
549
	public function remove_from_queue( $id ) {
550
		if ( ! empty( $this->queued_imports ) ) {
551
			// @codingStandardsIgnoreLine
552
			if ( ( $key = array_search( $id, $this->queued_imports ) ) !== false ) {
553
				unset( $this->queued_imports[ $key ] );
554
555
				delete_option( 'wetu_importer_que' );
556
				update_option( 'wetu_importer_que',$this->queued_imports );
557
			}
558
		}
559
	}
560
561
	/**
562
	 * Connect to wetu