system_id ?? 0) . '.' . ($task->assignee_id ?? 0) . '.' . $task->workflow_id . '.' . $task->status_id; $node = Arr::get($result, $key, ['total' => 0, 'test' => 0, 'overdue' => 0]); $node['total'] = $node['total'] + 1; $node['test'] = $node['test'] + $task->ready_to_test; $node['overdue'] = $node['overdue'] + ($task->on_time? 0: 1); Arr::set($result, $key, $node); return $next($tasks); } }