Code Duplication    Length = 11-11 lines in 2 locations

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

@@ 420-430 (lines=11) @@
417
	/**
418
	 * Saves the queue to the option.
419
	 */
420
	public function remove_from_queue( $id ) {
421
		if ( ! empty( $this->queued_imports ) ) {
422
			// @codingStandardsIgnoreLine
423
			if ( ( $key = array_search( $id, $this->queued_imports ) ) !== false ) {
424
				unset( $this->queued_imports[ $key ] );
425
426
				delete_option( 'wetu_importer_que' );
427
				update_option( 'wetu_importer_que',$this->queued_imports );
428
			}
429
		}
430
	}
431
432
	/**
433
	 * Connect to wetu

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

@@ 540-550 (lines=11) @@
537
	/**
538
	 * Saves the queue to the option.
539
	 */
540
	public function remove_from_queue( $id ) {
541
		if ( ! empty( $this->queued_imports ) ) {
542
			// @codingStandardsIgnoreLine
543
			if ( ( $key = array_search( $id, $this->queued_imports ) ) !== false ) {
544
				unset( $this->queued_imports[ $key ] );
545
546
				delete_option( 'wetu_importer_que' );
547
				update_option( 'wetu_importer_que',$this->queued_imports );
548
			}
549
		}
550
	}
551
552
	/**
553
	 * Connect to wetu