Code Duplication    Length = 10-10 lines in 2 locations

manager/includes/document.parser.class.inc.php 2 locations

@@ 1711-1720 (lines=10) @@
1708
            $content);
1709
1710
        $pieces = explode('<@IF:', $content);
1711
        foreach ($pieces as $i => $split) {
1712
            if ($i === 0) {
1713
                $content = $split;
1714
                continue;
1715
            }
1716
            list($cmd, $text) = explode('>', $split, 2);
1717
            $cmd = str_replace("'", "\'", $cmd);
1718
            $content .= "<?php if(\$this->_parseCTagCMD('" . $cmd . "')): ?>";
1719
            $content .= $text;
1720
        }
1721
        $pieces = explode('<@ELSEIF:', $content);
1722
        foreach ($pieces as $i => $split) {
1723
            if ($i === 0) {
@@ 1722-1731 (lines=10) @@
1719
            $content .= $text;
1720
        }
1721
        $pieces = explode('<@ELSEIF:', $content);
1722
        foreach ($pieces as $i => $split) {
1723
            if ($i === 0) {
1724
                $content = $split;
1725
                continue;
1726
            }
1727
            list($cmd, $text) = explode('>', $split, 2);
1728
            $cmd = str_replace("'", "\'", $cmd);
1729
            $content .= "<?php elseif(\$this->_parseCTagCMD('" . $cmd . "')): ?>";
1730
            $content .= $text;
1731
        }
1732
1733
        $content = str_replace(array('<@ELSE>', '<@ENDIF>'), array('<?php else:?>', '<?php endif;?>'), $content);
1734
        ob_start();