Code Duplication    Length = 8-8 lines in 2 locations

code/ModuleProduct.php 2 locations

@@ 299-306 (lines=8) @@
296
     *
297
     * @return Object Product
298
     */
299
    public function PreviousProduct()
300
    {
301
        return ModuleProduct::get()
302
            ->where("\"Sort\" < ".$this->Sort." AND ParentID = ".$this->ParentID)
303
            ->sort("Sort", "DESC")
304
            ->limit(1)
305
            ->first();
306
    }
307
308
    /**
309
     *
@@ 312-319 (lines=8) @@
309
     *
310
     * @return Object Product
311
     */
312
    public function NextProduct()
313
    {
314
        return ModuleProduct::get()
315
            ->where("\"Sort\" > ".$this->Sort." AND ParentID = ".$this->ParentID)
316
            ->sort("Sort", "ASC")
317
            ->limit(1)
318
            ->first();
319
    }
320
321
322
    public function HasPreviousOrNextProduct()