private function analyzeGroup(Startgroup $group) { $groups = new Map(); $this->prepareMap($groups); foreach ($group->getRoutines() as $routine) { foreach ($this->targets as $key => $target) { $getter = sprintf('getPerformance%sStatistic', $target); $statistic = $routine->{$getter}(); if ($statistic === null) { $setter = sprintf('setPerformance%sStatistic', $target); $statistic = new PerformanceStatistic(); $routine->{$setter}($statistic); } $statistic = $this->analyzeRoutine($routine, $statistic, $target); $this->all->get($key)->add($statistic); $groups->get($key)->add($statistic); } $routine->save(); } $this->processSummary($group, $groups); $group->save(); }