reportEngine = $reportEngine; } /** * Builds the report body for the requested period. Authorization happens in the engine * (reports.view per project) — an unauthorized project yields an empty report. */ public function get(): void { $projectId = (int) session('currentProject'); $period = ReportPeriod::fromRequest($this->incomingRequest->query->all()); $this->tpl->assign('projectId', $projectId); $this->tpl->assign('period', $period); $this->tpl->assign('report', $this->reportEngine->buildReport([$projectId], $period)); } }