| Conditions | 4 |
| Paths | 4 |
| Total Lines | 18 |
| Code Lines | 9 |
| 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 | if ($serie->getStatus()->isInactive()) { |
||
| 31 | return; |
||
| 32 | } |
||
| 33 | |||
| 34 | $ranking = $this->rankingProvider->getRankingPoints($serie->getId(), array('maxRank' => 1)); |
||
| 35 | |||
| 36 | $teams = array(); |
||
| 37 | foreach ($ranking as $teamSerie) { |
||
| 38 | $teams[$teamSerie->getTeam()->getId()] = 0; |
||
| 39 | } |
||
| 40 | |||
| 41 | $this->em->getRepository('VideoGamesRecords\CoreBundle\Entity\TeamBadge')->updateBadge($teams, $serie->getBadge()); |
||
| 42 | } |
||
| 44 |