Code Duplication    Length = 12-12 lines in 2 locations

classes/class-wetu-importer.php 2 locations

@@ 612-623 (lines=12) @@
609
	 * @param $needle string
610
	 * @param $echo bool
611
	 */
612
	public function checked( $haystack = false, $needle = '', $echo = true ) {
613
		$return = $this->itemd( $haystack,$needle, 'checked' );
614
615
		if ( '' !== $return ) {
616
			if ( true === $echo ) {
617
				// @codingStandardsIgnoreLine
618
				echo $return;
619
			} else {
620
				return $return;
621
			}
622
		}
623
	}
624
625
	/**
626
	 * Checks to see if an item is checked.
@@ 632-643 (lines=12) @@
629
	 * @param $needle string
630
	 * @param $echo bool
631
	 */
632
	public function selected( $haystack = false, $needle = '', $echo = true ) {
633
		$return = $this->itemd( $haystack,$needle,'selected' );
634
635
		if ( '' !== $return ) {
636
			if ( true === $echo ) {
637
				// @codingStandardsIgnoreLine
638
				echo $return;
639
			} else {
640
				return $return;
641
			}
642
		}
643
	}
644
645
	/**
646
	 * Checks to see if an item is selected. If $echo is false,  it will return the $type if conditions are true.