| Total Complexity | 3 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class OpenInterestResponseItem extends AbstractResponse |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Open interest |
||
| 11 | * @var float $openInterest |
||
| 12 | */ |
||
| 13 | private float $openInterest; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * The timestamp |
||
| 17 | * @var \DateTime $timestamp |
||
| 18 | */ |
||
| 19 | private \DateTime $timestamp; |
||
| 20 | |||
| 21 | public function __construct(array $data) |
||
| 22 | { |
||
| 23 | $this->openInterest = $data['openInterest']; |
||
| 24 | $this->timestamp = DateTimeHelper::makeFromTimestamp($data['timestamp']); |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @return float |
||
| 29 | */ |
||
| 30 | public function getOpenInterest(): float |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @return \DateTime |
||
| 37 | */ |
||
| 38 | public function getTimestamp(): \DateTime |
||
| 41 | } |
||
| 42 | } |