OrderBookRequest   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 50
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 50
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A setLimit() 0 4 1
A setSymbol() 0 4 1
A getLimit() 0 3 1
A getSymbol() 0 3 1
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