Code Duplication    Length = 5-5 lines in 8 locations

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

@@ 1318-1322 (lines=5) @@
1315
                $value = $this->applyFilter($value, $modifiers, $key);
1316
            }
1317
1318
            if (strpos($content, $s) !== false) {
1319
                $content = str_replace($s, $value, $content);
1320
            } elseif($this->debug) {
1321
                $this->addLog('mergeDocumentContent parse error', $_SERVER['REQUEST_URI'] . $s, 2);
1322
            }
1323
        }
1324
1325
        return $content;
@@ 1486-1490 (lines=5) @@
1483
                $value = $this->applyFilter($value, $modifiers, $key);
1484
            }
1485
            $s = &$matches[0][$i];
1486
            if (strpos($content, $s) !== false) {
1487
                $content = str_replace($s, $value, $content);
1488
            } elseif($this->debug) {
1489
                $this->addLog('mergeSettingsContent parse error', $_SERVER['REQUEST_URI'] . $s, 2);
1490
            }
1491
        }
1492
        return $content;
1493
    }
@@ 1555-1559 (lines=5) @@
1552
            }
1553
1554
            $s = &$matches[0][$i];
1555
            if (strpos($content, $s) !== false) {
1556
                $content = str_replace($s, $value, $content);
1557
            } elseif($this->debug) {
1558
                $this->addLog('mergeChunkContent parse error', $_SERVER['REQUEST_URI'] . $s, 2);
1559
            }
1560
        }
1561
        return $content;
1562
    }
@@ 1614-1618 (lines=5) @@
1611
                $value = $this->applyFilter($value, $modifiers, $key);
1612
            }
1613
            $s = &$matches[0][$i];
1614
            if (strpos($content, $s) !== false) {
1615
                $content = str_replace($s, $value, $content);
1616
            } elseif($this->debug) {
1617
                $this->addLog('mergePlaceholderContent parse error', $_SERVER['REQUEST_URI'] . $s, 2);
1618
            }
1619
        }
1620
        return $content;
1621
    }
@@ 1825-1829 (lines=5) @@
1822
        foreach ($matches[1] as $i => $v) {
1823
            $v = str_ireplace($sTags, $rTags, $v);
1824
            $s = &$matches[0][$i];
1825
            if (strpos($content, $s) !== false) {
1826
                $content = str_replace($s, $v, $content);
1827
            } elseif($this->debug) {
1828
                $this->addLog('ignoreCommentedTagsContent parse error', $_SERVER['REQUEST_URI'] . $s, 2);
1829
            }
1830
        }
1831
        return $content;
1832
    }
@@ 1982-1986 (lines=5) @@
1979
                } else {
1980
                    $value = $s;
1981
                }
1982
                if (strpos($content, $s) !== false) {
1983
                    $content = str_replace($s, $value, $content);
1984
                } elseif($this->debug) {
1985
                    $this->addLog('evalSnippetsSGVar parse error', $_SERVER['REQUEST_URI'] . $s, 2);
1986
                }
1987
                continue;
1988
            }
1989
            $value = $this->_get_snip_result($call);
@@ 1994-1998 (lines=5) @@
1991
                continue;
1992
            }
1993
1994
            if (strpos($content, $s) !== false) {
1995
                $content = str_replace($s, $value, $content);
1996
            } elseif($this->debug) {
1997
                $this->addLog('evalSnippets parse error', $_SERVER['REQUEST_URI'] . $s, 2);
1998
            }
1999
        }
2000
2001
        if ($this->dumpSnippets) {
@@ 4332-4336 (lines=5) @@
4329
                }
4330
                $value = $this->applyFilter($value, $modifiers, $key);
4331
            }
4332
            if (strpos($tpl, $s) !== false) {
4333
                $tpl = str_replace($s, $value, $tpl);
4334
            } elseif($this->debug) {
4335
                $this->addLog('parseText parse error', $_SERVER['REQUEST_URI'] . $s, 2);
4336
            }
4337
        }
4338
4339
        return $tpl;