| Total Complexity | 5 |
| Total Lines | 50 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | final class Currency extends AbstractWriteModel |
||
| 8 | { |
||
| 9 | public const CURRENCY = 'currency'; |
||
| 10 | public const SYMBOL = 'symbol'; |
||
| 11 | |||
| 12 | protected const PROPERTY_NAME_MAP = [ |
||
| 13 | 'currency' => self::CURRENCY, |
||
| 14 | 'Currency' => self::CURRENCY, |
||
| 15 | 'symbol' => self::SYMBOL, |
||
| 16 | 'Symbol' => self::SYMBOL, |
||
| 17 | ]; |
||
| 18 | |||
| 19 | private const METADATA = [ |
||
| 20 | self::CURRENCY => [ |
||
| 21 | 'type' => self::TYPE_STRING, |
||
| 22 | ], |
||
| 23 | self::SYMBOL => [ |
||
| 24 | 'type' => self::TYPE_STRING, |
||
| 25 | ], |
||
| 26 | ]; |
||
| 27 | protected ?string $currency = null; |
||
| 28 | protected ?string $symbol = null; |
||
| 29 | |||
| 30 | 1 | public function getCurrency(): ?string |
|
| 31 | { |
||
| 32 | 1 | return $this->currency; |
|
| 33 | } |
||
| 34 | |||
| 35 | 1 | public function setCurrency(?string $currency): self |
|
| 36 | { |
||
| 37 | 1 | $this->currency = $currency; |
|
| 38 | |||
| 39 | 1 | return $this; |
|
| 40 | } |
||
| 41 | |||
| 42 | 1 | public function getSymbol(): ?string |
|
| 43 | { |
||
| 44 | 1 | return $this->symbol; |
|
| 45 | } |
||
| 46 | |||
| 47 | 1 | public function setSymbol(?string $symbol): self |
|
| 48 | { |
||
| 49 | 1 | $this->symbol = $symbol; |
|
| 50 | |||
| 51 | 1 | return $this; |
|
| 52 | } |
||
| 53 | |||
| 54 | 15 | protected function metadata(): array |
|
| 57 | } |
||
| 58 | } |
||
| 59 |