Code Duplication    Length = 11-11 lines in 2 locations

classes/class-lsx-wetu-importer.php 2 locations

@@ 638-648 (lines=11) @@
635
	 * @param $needle string
636
	 * @param $echo bool
637
	 */
638
	public function checked( $haystack = false, $needle = '', $echo = true ) {
639
		$return = $this->itemd( $haystack,$needle, 'checked' );
640
641
		if ( '' !== $return ) {
642
			if ( true === $echo ) {
643
				echo wp_kses_post( $return );
644
			} else {
645
				return $return;
646
			}
647
		}
648
	}
649
650
	/**
651
	 * Checks to see if an item is checked.
@@ 657-667 (lines=11) @@
654
	 * @param $needle string
655
	 * @param $echo bool
656
	 */
657
	public function selected( $haystack = false, $needle = '', $echo = true ) {
658
		$return = $this->itemd( $haystack, $needle, 'selected' );
659
660
		if ( '' !== $return ) {
661
			if ( true === $echo ) {
662
				echo wp_kses_post( $return );
663
			} else {
664
				return $return;
665
			}
666
		}
667
	}
668
669
	/**
670
	 * Checks to see if an item is selected. If $echo is false,  it will return the $type if conditions are true.