Code Duplication    Length = 5-5 lines in 8 locations

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

@@ 1375-1379 (lines=5) @@
1372
                $value = $this->applyFilter($value, $modifiers, $key);
1373
            }
1374
1375
            if (strpos($content, $s) !== false) {
1376
                $content = str_replace($s, $value, $content);
1377
            } elseif ($this->debug) {
1378
                $this->addLog('mergeDocumentContent parse error', $_SERVER['REQUEST_URI'] . $s, 2);
1379
            }
1380
        }
1381
1382
        return $content;
@@ 1544-1548 (lines=5) @@
1541
                $value = $this->applyFilter($value, $modifiers, $key);
1542
            }
1543
            $s = &$matches[0][$i];
1544
            if (strpos($content, $s) !== false) {
1545
                $content = str_replace($s, $value, $content);
1546
            } elseif ($this->debug) {
1547
                $this->addLog('mergeSettingsContent parse error', $_SERVER['REQUEST_URI'] . $s, 2);
1548
            }
1549
        }
1550
1551
        return $content;
@@ 1614-1618 (lines=5) @@
1611
            }
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('mergeChunkContent parse error', $_SERVER['REQUEST_URI'] . $s, 2);
1618
            }
1619
        }
1620
1621
        return $content;
@@ 1674-1678 (lines=5) @@
1671
                $value = $this->applyFilter($value, $modifiers, $key);
1672
            }
1673
            $s = &$matches[0][$i];
1674
            if (strpos($content, $s) !== false) {
1675
                $content = str_replace($s, $value, $content);
1676
            } elseif ($this->debug) {
1677
                $this->addLog('mergePlaceholderContent parse error', $_SERVER['REQUEST_URI'] . $s, 2);
1678
            }
1679
        }
1680
1681
        return $content;
@@ 1900-1904 (lines=5) @@
1897
        foreach ($matches[1] as $i => $v) {
1898
            $v = str_ireplace($sTags, $rTags, $v);
1899
            $s = &$matches[0][$i];
1900
            if (strpos($content, $s) !== false) {
1901
                $content = str_replace($s, $v, $content);
1902
            } elseif ($this->debug) {
1903
                $this->addLog('ignoreCommentedTagsContent parse error', $_SERVER['REQUEST_URI'] . $s, 2);
1904
            }
1905
        }
1906
1907
        return $content;
@@ 2062-2066 (lines=5) @@
2059
                } else {
2060
                    $value = $s;
2061
                }
2062
                if (strpos($content, $s) !== false) {
2063
                    $content = str_replace($s, $value, $content);
2064
                } elseif ($this->debug) {
2065
                    $this->addLog('evalSnippetsSGVar parse error', $_SERVER['REQUEST_URI'] . $s, 2);
2066
                }
2067
                continue;
2068
            }
2069
            $value = $this->_get_snip_result($call);
@@ 2074-2078 (lines=5) @@
2071
                continue;
2072
            }
2073
2074
            if (strpos($content, $s) !== false) {
2075
                $content = str_replace($s, $value, $content);
2076
            } elseif ($this->debug) {
2077
                $this->addLog('evalSnippets parse error', $_SERVER['REQUEST_URI'] . $s, 2);
2078
            }
2079
        }
2080
2081
        if ($this->dumpSnippets) {
@@ 4505-4509 (lines=5) @@
4502
                }
4503
                $value = $this->applyFilter($value, $modifiers, $key);
4504
            }
4505
            if (strpos($tpl, $s) !== false) {
4506
                $tpl = str_replace($s, $value, $tpl);
4507
            } elseif ($this->debug) {
4508
                $this->addLog('parseText parse error', $_SERVER['REQUEST_URI'] . $s, 2);
4509
            }
4510
        }
4511
4512
        return $tpl;