| Total Complexity | 7 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | final class Settings |
||
| 21 | { |
||
| 22 | private string $uuid; |
||
| 23 | private string $locale; |
||
| 24 | private string $currency; |
||
| 25 | |||
| 26 | public function __construct(SettingsUuid $uuid, Locale $locale, Currency $currency) |
||
| 27 | { |
||
| 28 | $this->uuid = $uuid->toString(); |
||
| 29 | $this->locale = $locale->getValue(); |
||
| 30 | $this->currency = $currency->getValue(); |
||
| 31 | } |
||
| 32 | |||
| 33 | public static function create(SettingsUuid $uuid, Locale $locale, Currency $currency): self |
||
| 34 | { |
||
| 35 | return new self($uuid, $locale, $currency); |
||
| 36 | } |
||
| 37 | |||
| 38 | public function uuid(): string |
||
| 41 | } |
||
| 42 | |||
| 43 | public function locale(): string |
||
| 46 | } |
||
| 47 | |||
| 48 | public function currency(): string |
||
| 51 | } |
||
| 52 | |||
| 53 | public function changeLocale(string $locale): self |
||
| 54 | { |
||
| 55 | $this->locale = $locale; |
||
| 56 | |||
| 57 | return $this; |
||
| 58 | } |
||
| 59 | |||
| 60 | public function changeCurrency(string $currency): self |
||
| 65 | } |
||
| 66 | } |
||
| 67 |