Code Duplication    Length = 5-5 lines in 2 locations

src/Hal/Report/Html/template/oop.php 1 location

@@ 12-16 (lines=5) @@
9
        array_push($lcom, $c['lcom']);
10
    }
11
}
12
if (sizeof($lcom) > 0) {
13
    $lcom = round(array_sum($lcom) / sizeof($lcom), 2);
14
} else {
15
    $lcom = 0;
16
}
17
?>
18
19

src/Hal/Metric/Consolidated.php 1 location

@@ 99-103 (lines=5) @@
96
        $sum->nbInterfaces = $nbInterfaces;
97
98
        foreach ($avg as &$a) {
99
            if (sizeof($a) > 0) {
100
                $a = round(array_sum($a) / sizeof($a), 2);
101
            } else {
102
                $a = 0;
103
            }
104
        }
105
106
        // sums of violations