| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | public function findUserBettingByUserId(User $user, array $games) |
||
| 24 | { |
||
| 25 | $gameIds = array_map( |
||
| 26 | function ($game) { |
||
| 27 | return $game->getId(); |
||
| 28 | }, |
||
| 29 | $games |
||
| 30 | ); |
||
| 31 | |||
| 32 | return $this->createQueryBuilder('ub') |
||
| 33 | ->add('where', $this->createQueryBuilder('ub')->expr()->in('ub.game', $gameIds)) |
||
| 34 | ->where('ub.user = :userId') |
||
| 35 | ->setParameter('userId', $user->getId()) |
||
| 36 | ->getQuery() |
||
| 37 | ->getResult() |
||
| 38 | ; |
||
| 49 |