| Conditions | 4 |
| Paths | 4 |
| Total Lines | 11 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | public function format($input) |
||
| 14 | { |
||
| 15 | switch ($input) { |
||
| 16 | case Currency::CODE_EUR: |
||
| 17 | return self::CODE_EUR; |
||
| 18 | case Currency::CODE_USD: |
||
| 19 | return self::CODE_USD; |
||
| 20 | case Currency::CODE_TRY: |
||
| 21 | return self::CODE_TRY; |
||
| 22 | default: |
||
| 23 | throw new InvalidArgumentException('Bad currency code: ' . $input); |
||
| 24 | } |
||
| 27 |