LiquidationResponseItem::getPrice()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
namespace Carpenstar\ByBitAPI\WebSockets\Derivatives\PublicChannels\Liquidation\Entity;
3
4
use Carpenstar\ByBitAPI\Core\Helpers\DateTimeHelper;
5
use Carpenstar\ByBitAPI\Core\Objects\AbstractResponse;
6
7
class LiquidationResponseItem extends AbstractResponse
8
{
9
    private \DateTime $updatedTime;
10
    private string $symbol;
11
    private float $size;
12
    private float $price;
13
    private string $side;
14
15
    public function __construct(array $data)
16
    {
17
        $this->updatedTime = DateTimeHelper::makeFromTimestamp($data['updatedTime']);
18
        $this->symbol = $data['symbol'];
19
        $this->size = $data['size'];
20
        $this->price = $data['price'];
21
        $this->side = $data['side'];
22
    }
23
24
    public function getUpdatedTime(): \DateTime
25
    {
26
        return $this->updatedTime;
27
    }
28
29
    public function getSymbol(): string 
30
    {
31
        return $this->symbol;
32
    }
33
34
    public function getSize(): float
35
    {
36
        return $this->size;
37
    }
38
39
    public function getPrice(): float
40
    {
41
        return $this->price;
42
    }
43
44
    public function getSide(): string
45
    {
46
        return $this->side;
47
    }
48
}
49