Code Duplication    Length = 10-10 lines in 2 locations

classes/class-importer.php 2 locations

@@ 558-567 (lines=10) @@
555
	 * @param $needle string
556
	 * @param $echo bool
557
	 */
558
	public function checked($haystack=false,$needle='',$echo=true) {
559
		$return = $this->itemd($haystack,$needle,'checked');
560
		if('' !== $return) {
561
			if (true === $echo) {
562
				echo $return;
563
			} else {
564
				return $return;
565
			}
566
		}
567
	}
568
569
	/**
570
	 * Checks to see if an item is checked.
@@ 576-585 (lines=10) @@
573
	 * @param $needle string
574
	 * @param $echo bool
575
	 */
576
	public function selected($haystack=false,$needle='',$echo=true) {
577
		$return = $this->itemd($haystack,$needle,'selected');
578
		if('' !== $return) {
579
			if (true === $echo) {
580
				echo $return;
581
			} else {
582
				return $return;
583
			}
584
		}
585
	}
586
587
	/**
588
	 * Checks to see if an item is selected. If $echo is false,  it will return the $type if conditions are true.