public function load($manager) { $mates = $this->gameRepository->createRecentMateQuery()->getQuery()->execute(); foreach ($mates as $mate) { $trial = new Trial(); $trial->setGame($mate); $trial->setUser($mate->getWinner()->getUser()); $trial->setScore(70); $manager->persist($trial); } $manager->flush(); }
public function setVerdict(Trial $trial, $verdict) { $trial->setVerdict($verdict); }