OrderBookRequest::setSymbol()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Carpenstar\ByBitAPI\Spot\MarketData\OrderBook\Request;
4
5
use Carpenstar\ByBitAPI\Core\Objects\AbstractParameters;
6
use Carpenstar\ByBitAPI\Spot\MarketData\OrderBook\Interfaces\IOrderBookRequestInterface;
7
8
class OrderBookRequest extends AbstractParameters implements IOrderBookRequestInterface
9
{
10
    /**
11
     * Symbol
12
     * @required true
13
     * @var string $symbol
14
     */
15
    protected string $symbol;
16
17
    /**
18
     * Limit for data size. [1, 200]. Default: 100
19
     * @required false
20
     * @var int $limit
21
     */
22
    protected int $limit = 100;
23
24
    /**
25
     * @return string
26
     */
27
    public function getSymbol(): string
28
    {
29
        return $this->symbol;
30
    }
31
32
    /**
33
     * @param string $symbol
34
     * @return $this
35
     */
36
    public function setSymbol(string $symbol): self
37
    {
38
        $this->symbol = $symbol;
39
        return $this;
40
    }
41
42
    /**
43
     * @return int
44
     */
45
    public function getLimit(): int
46
    {
47
        return $this->limit;
48
    }
49
50
    /**
51
     * @param int $limit
52
     * @return $this
53
     */
54
    public function setLimit(int $limit): self
55
    {
56
        $this->limit = $limit;
57
        return $this;
58
    }
59
}
60