Code Duplication    Length = 8-8 lines in 2 locations

class/EventHandler.php 2 locations

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