| Total Complexity | 2 | 
| Total Lines | 29 | 
| Duplicated Lines | 0 % | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 12 | class AffiliateReferralRepository extends EntityRepository implements AffiliateReferralRepositoryInterface  | 
            ||
| 13 | { | 
            ||
| 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 | ;  | 
            ||
| 25 | }  | 
            ||
| 26 | |||
| 27 | public function findOneByAffiliateAndProductNotExpired(  | 
            ||
| 41 | ;  | 
            ||
| 42 | }  | 
            ||
| 44 |