| Total Complexity | 7 |
| Total Lines | 23 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | final class GetSettings implements QueryInterface |
||
| 21 | { |
||
| 22 | private ?string $currency = null; |
||
| 23 | private ?string $locale = null; |
||
| 24 | |||
| 25 | public function __construct(?string $setting = null) |
||
| 26 | { |
||
| 27 | if (null !== $setting && \in_array($setting, Locale::LOCALE, true)) { |
||
| 28 | $this->currency = $setting; |
||
| 29 | } |
||
| 30 | if (null !== $setting && \in_array($setting, Currency::CURRENCY, true)) { |
||
| 31 | $this->locale = $setting; |
||
| 32 | } |
||
| 33 | } |
||
| 34 | |||
| 35 | public function currency(): ?string |
||
| 36 | { |
||
| 37 | return $this->currency; |
||
| 38 | } |
||
| 39 | |||
| 40 | public function locale(): ?string |
||
| 43 | } |
||
| 44 | } |
||
| 45 |