Code Duplication    Length = 3-3 lines in 2 locations

app/Services/Analytic/TaskDistributionAnalytic.php 1 location

@@ 48-50 (lines=3) @@
45
            return [];
46
        }
47
48
        foreach ($metrics as &$metric) {
49
            $metric['percentage'] = round(($metric['nb_tasks'] * 100) / $total, 2);
50
        }
51
52
        return $metrics;
53
    }

app/Services/Analytic/UserDistributionAnalytic.php 1 location

@@ 54-56 (lines=3) @@
51
            return [];
52
        }
53
54
        foreach ($metrics as &$metric) {
55
            $metric['percentage'] = round(($metric['nb_tasks'] * 100) / $total, 2);
56
        }
57
58
        ksort($metrics);
59