Code Duplication    Length = 10-10 lines in 2 locations

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

@@ 1645-1654 (lines=10) @@
1642
        $content = str_replace(array('<?php', '<?=', '<?', '?>'), array("{$sp}b", "{$sp}p", "{$sp}s", "{$sp}e"), $content);
1643
1644
        $pieces = explode('<@IF:', $content);
1645
        foreach ($pieces as $i => $split) {
1646
            if ($i === 0) {
1647
                $content = $split;
1648
                continue;
1649
            }
1650
            list($cmd, $text) = explode('>', $split, 2);
1651
            $cmd = str_replace("'", "\'", $cmd);
1652
            $content .= "<?php if(\$this->_parseCTagCMD('" . $cmd . "')): ?>";
1653
            $content .= $text;
1654
        }
1655
        $pieces = explode('<@ELSEIF:', $content);
1656
        foreach ($pieces as $i => $split) {
1657
            if ($i === 0) {
@@ 1656-1665 (lines=10) @@
1653
            $content .= $text;
1654
        }
1655
        $pieces = explode('<@ELSEIF:', $content);
1656
        foreach ($pieces as $i => $split) {
1657
            if ($i === 0) {
1658
                $content = $split;
1659
                continue;
1660
            }
1661
            list($cmd, $text) = explode('>', $split, 2);
1662
            $cmd = str_replace("'", "\'", $cmd);
1663
            $content .= "<?php elseif(\$this->_parseCTagCMD('" . $cmd . "')): ?>";
1664
            $content .= $text;
1665
        }
1666
1667
        $content = str_replace(array('<@ELSE>', '<@ENDIF>'), array('<?php else:?>', '<?php endif;?>'), $content);
1668
        ob_start();