Code Duplication    Length = 5-5 lines in 8 locations

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

@@ 1367-1371 (lines=5) @@
1364
                $value = $this->applyFilter($value, $modifiers, $key);
1365
            }
1366
1367
            if (strpos($content, $s) !== false) {
1368
                $content = str_replace($s, $value, $content);
1369
            } elseif ($this->debug) {
1370
                $this->addLog('mergeDocumentContent parse error', $_SERVER['REQUEST_URI'] . $s, 2);
1371
            }
1372
        }
1373
1374
        return $content;
@@ 1535-1539 (lines=5) @@
1532
                $value = $this->applyFilter($value, $modifiers, $key);
1533
            }
1534
            $s = &$matches[0][$i];
1535
            if (strpos($content, $s) !== false) {
1536
                $content = str_replace($s, $value, $content);
1537
            } elseif ($this->debug) {
1538
                $this->addLog('mergeSettingsContent parse error', $_SERVER['REQUEST_URI'] . $s, 2);
1539
            }
1540
        }
1541
        return $content;
1542
    }
@@ 1604-1608 (lines=5) @@
1601
            }
1602
1603
            $s = &$matches[0][$i];
1604
            if (strpos($content, $s) !== false) {
1605
                $content = str_replace($s, $value, $content);
1606
            } elseif ($this->debug) {
1607
                $this->addLog('mergeChunkContent parse error', $_SERVER['REQUEST_URI'] . $s, 2);
1608
            }
1609
        }
1610
        return $content;
1611
    }
@@ 1661-1665 (lines=5) @@
1658
                $value = $this->applyFilter($value, $modifiers, $key);
1659
            }
1660
            $s = &$matches[0][$i];
1661
            if (strpos($content, $s) !== false) {
1662
                $content = str_replace($s, $value, $content);
1663
            } elseif ($this->debug) {
1664
                $this->addLog('mergePlaceholderContent parse error', $_SERVER['REQUEST_URI'] . $s, 2);
1665
            }
1666
        }
1667
        return $content;
1668
    }
@@ 1872-1876 (lines=5) @@
1869
        foreach ($matches[1] as $i => $v) {
1870
            $v = str_ireplace($sTags, $rTags, $v);
1871
            $s = &$matches[0][$i];
1872
            if (strpos($content, $s) !== false) {
1873
                $content = str_replace($s, $v, $content);
1874
            } elseif ($this->debug) {
1875
                $this->addLog('ignoreCommentedTagsContent parse error', $_SERVER['REQUEST_URI'] . $s, 2);
1876
            }
1877
        }
1878
        return $content;
1879
    }
@@ 2029-2033 (lines=5) @@
2026
                } else {
2027
                    $value = $s;
2028
                }
2029
                if (strpos($content, $s) !== false) {
2030
                    $content = str_replace($s, $value, $content);
2031
                } elseif ($this->debug) {
2032
                    $this->addLog('evalSnippetsSGVar parse error', $_SERVER['REQUEST_URI'] . $s, 2);
2033
                }
2034
                continue;
2035
            }
2036
            $value = $this->_get_snip_result($call);
@@ 2041-2045 (lines=5) @@
2038
                continue;
2039
            }
2040
2041
            if (strpos($content, $s) !== false) {
2042
                $content = str_replace($s, $value, $content);
2043
            } elseif ($this->debug) {
2044
                $this->addLog('evalSnippets parse error', $_SERVER['REQUEST_URI'] . $s, 2);
2045
            }
2046
        }
2047
2048
        if ($this->dumpSnippets) {
@@ 4366-4370 (lines=5) @@
4363
                }
4364
                $value = $this->applyFilter($value, $modifiers, $key);
4365
            }
4366
            if (strpos($tpl, $s) !== false) {
4367
                $tpl = str_replace($s, $value, $tpl);
4368
            } elseif ($this->debug) {
4369
                $this->addLog('parseText parse error', $_SERVER['REQUEST_URI'] . $s, 2);
4370
            }
4371
        }
4372
4373
        return $tpl;