Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
14 | public function findOneByAffiliateNotExpired(AffiliateInterface $affiliate): ?AffiliateReferralInterface |
||
15 | { |
||
16 | return $this->createQueryBuilder('o') |
||
|
|||
17 | ->andWhere('o.affiliate = :affiliate') |
||
18 | ->andWhere('o.product IS NULL') |
||
19 | ->andWhere('o.expiresAt IS NULL') |
||
20 | ->setParameter('affiliate', $affiliate) |
||
21 | ->setMaxResults(1) |
||
22 | ->getQuery() |
||
23 | ->getOneOrNullResult() |
||
24 | ; |
||
44 |