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 | 6 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
62 | 3 | public function bankAccount($countryCode, $bank) |
|
63 | { |
||
64 | 3 | $filteredCountryCode = mb_strtoupper($countryCode); |
|
65 | switch ($filteredCountryCode) { |
||
66 | 3 | case 'DE': |
|
67 | 2 | return new GermanBankAccount($bank); |
|
68 | |||
69 | default: |
||
70 | 1 | throw new ComponentException( |
|
71 | sprintf( |
||
72 | 1 | 'Cannot provide bank account validation for country "%s" and bank "%s"', |
|
73 | $countryCode, |
||
74 | $bank |
||
75 | ) |
||
76 | ); |
||
77 | } |
||
78 | } |
||
79 | } |
||
80 |