| Total Complexity | 5 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | abstract class BaseCountry implements CountryInterface |
||
| 22 | { |
||
| 23 | protected ?CountryCurrency $currency; |
||
| 24 | |||
| 25 | public function getCurrency() : CountryCurrency |
||
| 26 | { |
||
| 27 | if(!isset($this->currency)) { |
||
| 28 | $this->currency = new CountryCurrency( |
||
| 29 | Localization::createCurrencies()->getByID($this->getCurrencyISO()), |
||
| 30 | $this |
||
| 31 | ); |
||
| 32 | } |
||
| 33 | |||
| 34 | return $this->currency; |
||
|
|
|||
| 35 | } |
||
| 36 | |||
| 37 | public function getID() : string |
||
| 38 | { |
||
| 39 | return $this->getCode(); |
||
| 40 | } |
||
| 41 | |||
| 42 | public function getCurrencyID() : string |
||
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Returns the human-readable locale label. |
||
| 49 | * @return string |
||
| 50 | * @see getLabel() |
||
| 51 | */ |
||
| 52 | public function __toString() |
||
| 57 |