| Total Complexity | 9 |
| Total Lines | 52 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | class Simple extends Base |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @config |
||
| 17 | * @var float |
||
| 18 | */ |
||
| 19 | private static $default_charge = 10; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @config |
||
| 23 | * @var array |
||
| 24 | */ |
||
| 25 | private static $charges_by_country = array(); |
||
| 26 | |||
| 27 | public function value($subtotal = null) |
||
| 35 | } |
||
| 36 | |||
| 37 | public function getTableTitle() |
||
| 38 | { |
||
| 39 | if ($country = $this->Country()) { |
||
| 40 | $countryList = SiteConfig::current_site_config()->getCountriesList(); |
||
| 41 | |||
| 42 | return _t( |
||
| 43 | __CLASS__ . '.ShipToCountry', |
||
| 44 | 'Ship to {Country}', |
||
| 45 | '', |
||
| 46 | ['Country' => $countryList[$country]] |
||
| 47 | ); |
||
| 48 | } else { |
||
| 49 | return parent::getTableTitle(); |
||
| 50 | } |
||
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @return string | null |
||
| 55 | */ |
||
| 56 | public function Country() |
||
| 65 | } |
||
| 66 | } |
||
| 67 |