Total Complexity | 3 |
Total Lines | 23 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class PurchaseRedeemHistoryResponse extends AbstractResponse implements IPurchaseReedemHistoryResponseInterface |
||
11 | { |
||
12 | private EntityCollection $list; |
||
13 | |||
14 | public function __construct(array $data) |
||
15 | { |
||
16 | $list = new EntityCollection(); |
||
17 | |||
18 | if (!empty($data['list'])) { |
||
19 | array_map(function ($item) use ($list) { |
||
20 | $list->push(ResponseDtoBuilder::make(PurchaseRedeemHistoryResponseItem::class, $item)); |
||
21 | }, $data['list']); |
||
22 | } |
||
23 | |||
24 | $this->list = $list; |
||
25 | } |
||
26 | |||
27 | /** |
||
28 | * @return PurchaseRedeemHistoryResponseItem[] |
||
29 | */ |
||
30 | public function getPurchaseHistory(): array |
||
33 | } |
||
34 | } |
||
35 |