Code Duplication    Length = 4-5 lines in 2 locations

blocks/minical.php 2 locations

@@ 503-506 (lines=4) @@
500
501
    $d = date('j', $event['event_start']);
502
    if (isset($eventsArray[$d])) {
503
        if ($weight > $eventsArray[$d]['weight']) {
504
            $eventsArray[$d]['weight'] = $weight;
505
            $eventsArray[$d]['color']  = $color;
506
        }
507
    } else {
508
        $eventsArray[$d]['hasEvent'] = true;
509
        $eventsArray[$d]['weight']   = $weight;
@@ 507-511 (lines=5) @@
504
            $eventsArray[$d]['weight'] = $weight;
505
            $eventsArray[$d]['color']  = $color;
506
        }
507
    } else {
508
        $eventsArray[$d]['hasEvent'] = true;
509
        $eventsArray[$d]['weight']   = $weight;
510
        $eventsArray[$d]['color']    = $color;
511
    }
512
    /*
513
            for ($i = $firstDay; $i <= $lastDay; ++$i) {
514
                }