| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 17 | public function findByEnabledQueryBuilder(?ChannelInterface $channel): QueryBuilder |
||
| 18 | { |
||
| 19 | $queryBuilder = $this->createQueryBuilder('v') |
||
| 20 | ->andWhere('v.enabled = :enabled') |
||
| 21 | ->setParameter('enabled', true) |
||
| 22 | ; |
||
| 23 | |||
| 24 | if ($channel) { |
||
| 25 | $queryBuilder->innerJoin('v.channels', 'channel') |
||
| 26 | ->andWhere('channel = :channel') |
||
| 27 | ->setParameter('channel', $channel) |
||
| 28 | ; |
||
| 29 | } |
||
| 30 | |||
| 31 | return $queryBuilder; |
||
| 32 | } |
||
| 59 |