| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | public function createBankAccountForm(string $type): FormInterface |
||
| 34 | { |
||
| 35 | switch ($type) { |
||
| 36 | case SubscriptionInterface::TYPE_RECURRING: |
||
| 37 | return $this->formFactory->create(RecurringBankAccountType::class); |
||
| 38 | case SubscriptionInterface::TYPE_NON_RECURRING: |
||
| 39 | return $this->formFactory->create(BankAccountType::class); |
||
| 40 | default: |
||
| 41 | throw new \InvalidArgumentException(sprintf('%s is not a valid subscription type', $type)); |
||
| 42 | } |
||
| 43 | } |
||
| 44 | } |
||
| 45 |