| Conditions | 3 |
| Paths | 3 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | public function __construct(array $data) |
||
| 23 | { |
||
| 24 | $collection = new EntityCollection(); |
||
| 25 | |||
| 26 | $this->topic = $data['topic']; |
||
| 27 | $this->type = $data['type']; |
||
| 28 | $this->createdAt = DateTimeHelper::makeFromTimestamp($data['ts']); |
||
| 29 | |||
| 30 | if (!empty($data['data'])) { |
||
| 31 | if (!empty($data['data'])) { |
||
| 32 | array_map(function ($item) use ($collection) { |
||
| 33 | $collection->push(ResponseDtoBuilder::make(PublicTradeResponseItem::class, $item)); |
||
| 34 | }, $data['data']); |
||
| 35 | } |
||
| 36 | } |
||
| 37 | |||
| 38 | $this->data = $collection; |
||
| 39 | } |
||
| 61 |