| Total Complexity | 4 |
| Total Lines | 59 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | trait UpDownVoteCount |
||
| 12 | { |
||
| 13 | use DaftObjectTrait; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @return array<int, int> |
||
| 17 | */ |
||
| 18 | 13 | public function GetDownvoteCount() : array |
|
| 19 | { |
||
| 20 | /** |
||
| 21 | * @var array<int, int> |
||
| 22 | */ |
||
| 23 | 13 | $out = TypeUtilities::ExpectRetrievedValueIsArray( |
|
| 24 | 13 | 'downvoteCount', |
|
| 25 | 13 | $this->RetrievePropertyValueFromData('downvoteCount'), |
|
|
|
|||
| 26 | 13 | static::class |
|
| 27 | ); |
||
| 28 | |||
| 29 | 13 | return $out; |
|
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param array<int, int> $value |
||
| 34 | */ |
||
| 35 | 5 | public function SetDownvoteCount(array $value) : void |
|
| 36 | { |
||
| 37 | 5 | $this->NudgePropertyWithUniqueIntegers( |
|
| 38 | 5 | 'downvoteCount', |
|
| 39 | 5 | __METHOD__, |
|
| 40 | 5 | $value |
|
| 41 | ); |
||
| 42 | 5 | } |
|
| 43 | |||
| 44 | /** |
||
| 45 | * @return array<int, int> |
||
| 46 | */ |
||
| 47 | 13 | public function GetUpvoteCount() : array |
|
| 59 | } |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @param array<int, int> $value |
||
| 63 | */ |
||
| 64 | 5 | public function SetUpvoteCount(array $value) : void |
|
| 70 | ); |
||
| 71 | 5 | } |
|
| 72 | } |
||
| 73 |