| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 36 | public function getActiveMainSubscription(CustomerInterface $customer): Subscription |
||
| 37 | { |
||
| 38 | $subscription = $this->entityRepository->findOneBy(['customer' => $customer, 'active' => true, 'mainSubscription' => true]); |
||
| 39 | |||
| 40 | if (!$subscription instanceof Subscription) { |
||
| 41 | throw new NoEntityFoundException(); |
||
| 42 | } |
||
| 43 | |||
| 44 | return $subscription; |
||
| 45 | } |
||
| 52 |