Code Duplication    Length = 10-10 lines in 2 locations

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

@@ 1692-1701 (lines=10) @@
1689
        $content = str_replace(array('<?php', '<?=', '<?', '?>'), array("{$sp}b", "{$sp}p", "{$sp}s", "{$sp}e"), $content);
1690
1691
        $pieces = explode('<@IF:', $content);
1692
        foreach ($pieces as $i => $split) {
1693
            if ($i === 0) {
1694
                $content = $split;
1695
                continue;
1696
            }
1697
            list($cmd, $text) = explode('>', $split, 2);
1698
            $cmd = str_replace("'", "\'", $cmd);
1699
            $content .= "<?php if(\$this->_parseCTagCMD('" . $cmd . "')): ?>";
1700
            $content .= $text;
1701
        }
1702
        $pieces = explode('<@ELSEIF:', $content);
1703
        foreach ($pieces as $i => $split) {
1704
            if ($i === 0) {
@@ 1703-1712 (lines=10) @@
1700
            $content .= $text;
1701
        }
1702
        $pieces = explode('<@ELSEIF:', $content);
1703
        foreach ($pieces as $i => $split) {
1704
            if ($i === 0) {
1705
                $content = $split;
1706
                continue;
1707
            }
1708
            list($cmd, $text) = explode('>', $split, 2);
1709
            $cmd = str_replace("'", "\'", $cmd);
1710
            $content .= "<?php elseif(\$this->_parseCTagCMD('" . $cmd . "')): ?>";
1711
            $content .= $text;
1712
        }
1713
1714
        $content = str_replace(array('<@ELSE>', '<@ENDIF>'), array('<?php else:?>', '<?php endif;?>'), $content);
1715
        ob_start();