| Conditions | 1 | 
| Paths | 1 | 
| Total Lines | 15 | 
| Code Lines | 12 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 20 | public function loadByGame(): mixed  | 
            ||
| 21 |     { | 
            ||
| 22 | $query = $this->em->createQueryBuilder()  | 
            ||
| 23 |             ->from('VideoGamesRecords\CoreBundle\Entity\Game', 'gam') | 
            ||
| 24 |             ->select('gam') | 
            ||
| 25 |             ->addSelect('COUNT(proof) as nb') | 
            ||
| 26 |             ->innerJoin('gam.groups', 'grp') | 
            ||
| 27 |             ->innerJoin('grp.charts', 'chr') | 
            ||
| 28 |             ->innerJoin('chr.proofs', 'proof') | 
            ||
| 29 |             ->where('proof.status = :status') | 
            ||
| 30 |             ->setParameter('status', ProofStatus::STATUS_IN_PROGRESS) | 
            ||
| 31 |             ->groupBy('gam.id') | 
            ||
| 32 |             ->orderBy('nb', 'DESC'); | 
            ||
| 33 | |||
| 34 | return $query->getQuery()->getResult();  | 
            ||
| 35 | }  | 
            ||
| 37 |