Code Duplication    Length = 7-7 lines in 2 locations

testing/gen.php 2 locations

@@ 50-56 (lines=7) @@
47
48
        // convert a few single words in body to links
49
        $linklimit = mt_rand(3, 8);
50
        for ($j = 1; $j < $linklimit; ++$j) {
51
            $text = trim($LIGen->getContent(1, 'txt', $loremipsum = false));
52
            $text = str_replace('.', '', $text);
53
            $link = str_replace(array(' ', '.', ',', "\t"), array('-', '', '', ''), $text);
54
            $body = str_replace(' ' . $text . ' ', ' [[' . $link . '|' . $text . ']] ', $body);
55
            //echo $text.':';
56
        }
57
58
        // convert 2 word phrases in body to links - do lots since most won't be found
59
        $linklimit = mt_rand(100, 300);
@@ 60-66 (lines=7) @@
57
58
        // convert 2 word phrases in body to links - do lots since most won't be found
59
        $linklimit = mt_rand(100, 300);
60
        for ($j = 1; $j < $linklimit; ++$j) {
61
            $text = trim($LIGen->getContent(2, 'txt', $loremipsum = false));
62
            $text = str_replace('.', '', $text);
63
            $link = str_replace(array(' ', '.', ',', "\t"), array('-', '', '', ''), $text);
64
            $body = str_replace(' ' . $text . ' ', ' [[' . $link . '|' . $text . ']] ', $body);
65
            //echo $text.':';
66
        }
67
68
        $wikiPage->keyword         = $keyword;
69
        $wikiPage->title           = $title;