Code Duplication    Length = 10-10 lines in 2 locations

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

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