Code Duplication    Length = 4-7 lines in 2 locations

code/dataobjects/WebPortfolioWhatWeDidDescriptor.php 2 locations

@@ 43-49 (lines=7) @@
40
    public function Link()
41
    {
42
        $link = '';
43
        if ($page = WebPortfolioPage::get()->first()) {
44
            if (!$this->Code) {
45
                $this->Code = $page->generateURLSegment($this->Name);
46
                $this->write();
47
            }
48
            $link = $page->Link().'show/'.$this->Code."/";
49
        }
50
        return $link;
51
    }
52
@@ 114-117 (lines=4) @@
111
                $this->mergeInto = WebPortfolioWhatWeDidDescriptor::get()->byID($mergeID);
112
            }
113
        }
114
        if ($page = WebPortfolioPage::get()->first()) {
115
            $link = $page->Link().'show/'.$this->Code."/";
116
            $this->Code = $page->generateURLSegment($this->Name);
117
        }
118
    }
119
}
120