Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
24 | public function process(Serie $serie): void |
||
25 | { |
||
26 | if ($serie->getBadge() === null) { |
||
27 | return; |
||
28 | } |
||
29 | |||
30 | $ranking = $this->rankingProvider->getRankingPoints($serie->getId(), array('maxRank' => 1)); |
||
31 | |||
32 | $players = array(); |
||
33 | foreach ($ranking as $playerSerie) { |
||
34 | $players[$playerSerie->getPlayer()->getId()] = 0; |
||
35 | } |
||
36 | |||
37 | $this->em->getRepository('VideoGamesRecords\CoreBundle\Entity\PlayerBadge')->updateBadge($players, $serie->getBadge()); |
||
38 | } |
||
40 |