Code Duplication    Length = 8-8 lines in 2 locations

class/EventHandler.php 2 locations

@@ 2435-2442 (lines=8) @@
2432
        $result = $this->getSearchEvents(0, 0, 0, 0, $queryarray, $andor, ['event_id DESC']);
2433
2434
        $i = 0;
2435
        while ($myrow = $xoopsDB->fetchArray($result)) {
2436
            $ret[$i]['image'] = 'assets/images/icons/extcal.gif';
2437
            $ret[$i]['link']  = 'event.php?event=' . $myrow['event_id'];
2438
            $ret[$i]['title'] = $myrow['event_title'];
2439
            $ret[$i]['time']  = $myrow['event_submitdate'];
2440
            $ret[$i]['uid']   = $myrow['event_submitter'];
2441
            ++$i;
2442
        }
2443
2444
        return $ret;
2445
    }
@@ 2534-2541 (lines=8) @@
2531
        $ret    = [];
2532
        $i      = 0;
2533
        if ($xoopsSearch) {
2534
            while ($myrow = $xoopsDB->fetchArray($result)) {
2535
                $ret[$i]['image'] = 'assets/images/icons/extcal.gif';
2536
                $ret[$i]['link']  = 'event.php?event=' . $myrow['event_id'];
2537
                $ret[$i]['title'] = $myrow['event_title'];
2538
                $ret[$i]['time']  = $myrow['event_submitdate'];
2539
                $ret[$i]['uid']   = $myrow['event_submitter'];
2540
                ++$i;
2541
            }
2542
        } else {
2543
            while ($myrow = $xoopsDB->fetchArray($result)) {
2544
                $myrow['cat']['cat_name']  = $myrow['cat_name'];