public function collectData(IdentifiableInterface $root) { if ($root instanceof Project) { $this->data = $this->repo->fetchParticipantsOverTime($root); } elseif ($root instanceof Area) { $this->data = $this->repo->fetchAreaParticipantsOverTime($root); } return true; }