Code Duplication    Length = 7-8 lines in 2 locations

code/PresentationPage.php 2 locations

@@ 122-128 (lines=7) @@
119
        return $value;
120
    }
121
122
    function PreviousPage()
123
    {
124
        return PresentationPage::get()
125
            ->sort(array('Sort' => 'DESC'))
126
            ->where('Sort < '.$this->Sort.' AND ShowInSearch = 1')
127
            ->First();
128
    }
129
130
    function NextPage()
131
    {
@@ 130-137 (lines=8) @@
127
            ->First();
128
    }
129
130
    function NextPage()
131
    {
132
        return PresentationPage::get()
133
            ->where('Sort >= '.$this->Sort.'  AND ShowInSearch = 1')
134
            ->sort(array('Sort' => 'ASC'))
135
            ->exclude(array('ID' => $this->ID))
136
            ->First();
137
    }
138
139
}
140