Code Duplication    Length = 10-10 lines in 3 locations

class/files/TDMCreateHtmlSmartyCodes.php 3 locations

@@ 747-756 (lines=10) @@
744
     *
745
     * @return string
746
     */
747
    public function getSmartyForeach($item = 'item', $from = 'from', $content = 'content', $name = '', $key = '')
748
    {
749
        $name = $name != '' ? " name={$name}" : '';
750
        $key = $key != '' ? " key={$key}" : '';
751
        $ret = "<{foreach item={$item} from=\${$from}{$key}{$name}}>\n";
752
		$ret .= "\t{$content}\n";
753
		$ret .= "<{/foreach}>\n";
754
		
755
        return $ret;
756
    }
757
758
    /*
759
    *  @public function getSmartyForeachQuery
@@ 771-780 (lines=10) @@
768
     *
769
     * @return string
770
     */
771
    public function getSmartyForeachQuery($item = 'item', $from = 'from', $content = 'content', $loop = 'loop', $key = '')
772
    {
773
        $loop = $loop != '' ? " loop={$loop}" : '';
774
        $key = $key != '' ? " key={$key}" : '';
775
		$ret = "<{foreachq item={$item} from=\${$from}{$key}{$loop}}>\n";
776
		$ret .= "\t{$content}\n";
777
		$ret .= "<{/foreachq}>\n";
778
        
779
        return $ret;
780
    }
781
782
    /*
783
    *  @public function getSmartySection
@@ 795-804 (lines=10) @@
792
     *
793
     * @return string
794
     */
795
    public function getSmartySection($name = 'name', $loop = 'loop', $content = 'content', $start = 0, $step = 0)
796
    {
797
        $start = $start != 0 ? " start={$start}" : '';
798
        $step = $step != 0 ? " step={$step}" : '';
799
		$ret = "<{section name={$name} loop=\${$loop}{$start}{$step}}>\n";
800
		$ret .= "\t{$content}\n";
801
		$ret .= "<{/section}>\n";
802
        
803
        return $ret;
804
    }
805
}
806