Test Failed
Pull Request — master (#14)
by Vladislav
22:59 queued 14:48
created

MergedOrderBookRequest::__construct()   A

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
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Carpenstar\ByBitAPI\Spot\MarketData\MergedOrderBook\Request;
4
5
use Carpenstar\ByBitAPI\Core\Objects\AbstractParameters;
6
use Carpenstar\ByBitAPI\Spot\MarketData\MergedOrderBook\Interfaces\IMergedOrderBookRequestInterface;
7
8
class MergedOrderBookRequest extends AbstractParameters implements IMergedOrderBookRequestInterface
9
{
10
    /**
11
     * Name of the trading pair
12
     * @required true
13
     * @var string $symbol
14
     */
15
    protected string $symbol;
16
17
    /**
18
     * Precision of the merged orderbook, 1 means 1 digit
19
     * @required false
20
     * @var int $scale
21
     */
22
    protected int $scale = 1;
23
24
    /**
25
     * Limit for data size. [1, 200]. Default: 100
26
     * @required false
27
     * @var int $limit
28
     */
29
    protected int $limit = 100;
30
31
    /**
32
     * @return string
33
     */
34
    public function getSymbol(): string
35
    {
36
        return $this->symbol;
37
    }
38
39
    /**
40
     * Name of the trading pair
41
     * @param string $symbol
42
     * @return MergedOrderBookRequest
43
     */
44
    public function setSymbol(string $symbol): self
45
    {
46
        $this->symbol = $symbol;
47
        return $this;
48
    }
49
50
    /**
51
     * @return int
52
     */
53
    public function getScale(): int
54
    {
55
        return $this->scale;
56
    }
57
58
    /**
59
     * Precision of the merged orderbook, 1 means 1 digit
60
     * @param int $scale
61
     * @return MergedOrderBookRequest
62
     */
63
    public function setScale(int $scale): self
64
    {
65
        $this->scale = $scale;
66
        return $this;
67
    }
68
69
    /**
70
     * @return int
71
     */
72
    public function getLimit(): int
73
    {
74
        return $this->limit;
75
    }
76
77
    /**
78
     * Limit for data size. [1, 200]. Default: 100
79
     * @param int $limit
80
     * @return MergedOrderBookRequest
81
     */
82
    public function setLimit(int $limit): self
83
    {
84
        $this->limit = $limit;
85
        return $this;
86
    }
87
}
88