We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 52 | 3 | public function bankAccount($countryCode, $bank) |
|
| 53 | { |
||
| 54 | 3 | $filteredCountryCode = strtoupper($countryCode); |
|
| 55 | switch ($filteredCountryCode) { |
||
| 56 | 3 | case 'DE': |
|
| 57 | 2 | return new GermanBankAccount($bank); |
|
| 58 | |||
| 59 | 1 | default: |
|
| 60 | 1 | throw new ComponentException( |
|
| 61 | 1 | sprintf( |
|
| 62 | 1 | 'Cannot provide bank account validation for country "%s" and bank "%s"', |
|
| 63 | 1 | $countryCode, |
|
| 64 | $bank |
||
| 65 | 1 | ) |
|
| 66 | 1 | ); |
|
| 67 | 1 | } |
|
| 68 | } |
||
| 69 | } |
||
| 70 |