Code Duplication    Length = 10-10 lines in 2 locations

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

@@ 1665-1674 (lines=10) @@
1662
        $content = str_replace(array('<?php', '<?=', '<?', '?>'), array("{$sp}b", "{$sp}p", "{$sp}s", "{$sp}e"), $content);
1663
1664
        $pieces = explode('<@IF:', $content);
1665
        foreach ($pieces as $i => $split) {
1666
            if ($i === 0) {
1667
                $content = $split;
1668
                continue;
1669
            }
1670
            list($cmd, $text) = explode('>', $split, 2);
1671
            $cmd = str_replace("'", "\'", $cmd);
1672
            $content .= "<?php if(\$this->_parseCTagCMD('" . $cmd . "')): ?>";
1673
            $content .= $text;
1674
        }
1675
        $pieces = explode('<@ELSEIF:', $content);
1676
        foreach ($pieces as $i => $split) {
1677
            if ($i === 0) {
@@ 1676-1685 (lines=10) @@
1673
            $content .= $text;
1674
        }
1675
        $pieces = explode('<@ELSEIF:', $content);
1676
        foreach ($pieces as $i => $split) {
1677
            if ($i === 0) {
1678
                $content = $split;
1679
                continue;
1680
            }
1681
            list($cmd, $text) = explode('>', $split, 2);
1682
            $cmd = str_replace("'", "\'", $cmd);
1683
            $content .= "<?php elseif(\$this->_parseCTagCMD('" . $cmd . "')): ?>";
1684
            $content .= $text;
1685
        }
1686
1687
        $content = str_replace(array('<@ELSE>', '<@ENDIF>'), array('<?php else:?>', '<?php endif;?>'), $content);
1688
        ob_start();