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 | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 32 | 3 | public function bank($countryCode) |
|
| 33 | { |
||
| 34 | 3 | $filteredCountryCode = strtoupper($countryCode); |
|
| 35 | switch ($filteredCountryCode) { |
||
| 36 | 3 | case 'DE': |
|
| 37 | 2 | return new GermanBank(); |
|
| 38 | |||
| 39 | 1 | default: |
|
| 40 | 1 | throw new ComponentException( |
|
| 41 | 1 | sprintf( |
|
| 42 | 1 | 'Cannot provide bank validation for country "%s"', |
|
| 43 | $countryCode |
||
| 44 | 1 | ) |
|
| 45 | 1 | ); |
|
| 46 | 1 | } |
|
| 47 | } |
||
| 48 | |||
| 70 |