Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
31 | public function process(Game $game): void |
||
32 | { |
||
33 | //----- get ranking with maxRank = 1 |
||
34 | $ranking = $this->rankingProvider->getRankingPoints($game->getId(), ['maxRank' => 1]); |
||
35 | $players = array(); |
||
36 | foreach ($ranking as $playerGame) { |
||
37 | $players[$playerGame->getPlayer()->getId()] = 0; |
||
38 | } |
||
39 | |||
40 | $this->em->getRepository('VideoGamesRecords\CoreBundle\Entity\PlayerBadge')->updateBadge($players, $game->getBadge()); |
||
41 | } |
||
43 |