| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | public function getByCodeName(string $codeName): SubscriptionPlan |
||
| 36 | { |
||
| 37 | $subscriptionPlan = $this->entityRepository->findOneBy(['codeName' => $codeName]); |
||
| 38 | |||
| 39 | if (!$subscriptionPlan instanceof SubscriptionPlan) { |
||
| 40 | throw new NoEntityFoundException(sprintf("No subscription plan found for '%s'", $codeName)); |
||
| 41 | } |
||
| 42 | |||
| 43 | return $subscriptionPlan; |
||
| 44 | } |
||
| 46 |