Code Duplication    Length = 11-11 lines in 2 locations

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

@@ 409-419 (lines=11) @@
406
	/**
407
	 * Saves the queue to the option.
408
	 */
409
	public function remove_from_queue( $id ) {
410
		if ( ! empty( $this->queued_imports ) ) {
411
			// @codingStandardsIgnoreLine
412
			if ( ( $key = array_search( $id, $this->queued_imports ) ) !== false ) {
413
				unset( $this->queued_imports[ $key ] );
414
415
				delete_option( 'wetu_importer_que' );
416
				update_option( 'wetu_importer_que',$this->queued_imports );
417
			}
418
		}
419
	}
420
421
	/**
422
	 * Connect to wetu

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

@@ 507-517 (lines=11) @@
504
	/**
505
	 * Saves the queue to the option.
506
	 */
507
	public function remove_from_queue( $id ) {
508
		if ( ! empty( $this->queued_imports ) ) {
509
			// @codingStandardsIgnoreLine
510
			if ( ( $key = array_search( $id, $this->queued_imports ) ) !== false ) {
511
				unset( $this->queued_imports[ $key ] );
512
513
				delete_option( 'wetu_importer_que' );
514
				update_option( 'wetu_importer_que',$this->queued_imports );
515
			}
516
		}
517
	}
518
519
	/**
520
	 * Connect to wetu