Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
23 | public function handle($mixed): void |
||
24 | { |
||
25 | $country = $this->getCountryRepository()->find($mixed); |
||
26 | if (null === $country) { |
||
27 | return; |
||
28 | } |
||
29 | |||
30 | $players = $this->em->getRepository('VideoGamesRecords\CoreBundle\Entity\Player') |
||
31 | ->findBy(array('country' => $country), array('rankPointChart' => 'ASC')); |
||
32 | Ranking::addObjectRank($players, 'rankCountry', array('rankPointChart')); |
||
33 | $this->em->flush(); |
||
34 | |||
35 | $event = new CountryEvent($country); |
||
36 | $this->eventDispatcher->dispatch($event, VideoGamesRecordsCoreEvents::COUNTRY_MAJ_COMPLETED); |
||
37 | } |
||
44 |