Code Duplication    Length = 4-4 lines in 2 locations

app/Models/ProjectModel.php 2 locations

@@ 265-268 (lines=4) @@
262
        $columns = $this->columnModel->getAll($project_id);
263
        $column_stats = $this->boardModel->getColumnStats($project_id);
264
265
        foreach ($columns as &$column) {
266
            $column['nb_active_tasks'] = isset($column_stats[$column['id']]) ? $column_stats[$column['id']] : 0;
267
            $stats['nb_active_tasks'] += $column['nb_active_tasks'];
268
        }
269
270
        $stats['columns'] = $columns;
271
        $stats['nb_tasks'] = $this->taskFinderModel->countByProjectId($project_id);
@@ 290-293 (lines=4) @@
287
        $project['nb_active_tasks'] = 0;
288
        $stats = $this->boardModel->getColumnStats($project['id']);
289
290
        foreach ($project['columns'] as &$column) {
291
            $column['nb_tasks'] = isset($stats[$column['id']]) ? $stats[$column['id']] : 0;
292
            $project['nb_active_tasks'] += $column['nb_tasks'];
293
        }
294
295
        return $project;
296
    }