| Total Complexity | 4 |
| Total Lines | 57 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | trait PricePriceCurrency |
||
| 12 | { |
||
| 13 | use DaftObjectTrait; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @return array<int, int|string> |
||
| 17 | */ |
||
| 18 | public function GetPrice() : array |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * @var array<int, int|string> |
||
| 22 | */ |
||
| 23 | $out = TypeUtilities::ExpectRetrievedValueIsArray( |
||
| 24 | 'price', |
||
| 25 | $this->RetrievePropertyValueFromData('price'), |
||
|
|
|||
| 26 | static::class |
||
| 27 | ); |
||
| 28 | |||
| 29 | return $out; |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param array<int, int|string> $value |
||
| 34 | */ |
||
| 35 | public function SetPrice(array $value) : void |
||
| 36 | { |
||
| 37 | $this->NudgePropertyValue( |
||
| 38 | 'price', |
||
| 39 | $value |
||
| 40 | ); |
||
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @return array<int, string> |
||
| 45 | */ |
||
| 46 | public function GetPriceCurrency() : array |
||
| 47 | { |
||
| 48 | /** |
||
| 49 | * @var array<int, string> |
||
| 50 | */ |
||
| 51 | $out = TypeUtilities::ExpectRetrievedValueIsArray( |
||
| 52 | 'priceCurrency', |
||
| 53 | $this->RetrievePropertyValueFromData('priceCurrency'), |
||
| 54 | static::class |
||
| 55 | ); |
||
| 56 | |||
| 57 | return $out; |
||
| 58 | } |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @param array<int, string> $value |
||
| 62 | */ |
||
| 63 | public function SetPriceCurrency(array $value) : void |
||
| 68 | ); |
||
| 69 | } |
||
| 70 | } |
||
| 71 |