Passed
Push — master ( 293860...80c37e )
by Vladislav
05:16 queued 02:59
created

PublicTradingRecordsRequest   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 55
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 55
rs 10
c 0
b 0
f 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getLimit() 0 3 1
A setLimit() 0 4 1
A getSymbol() 0 3 1
A setSymbol() 0 4 1
1
<?php
2
namespace Carpenstar\ByBitAPI\Spot\MarketData\PublicTradingRecords\Request;
3
4
use Carpenstar\ByBitAPI\Core\Objects\AbstractParameters;
5
6
class PublicTradingRecordsRequest extends AbstractParameters
7
{
8
    /**
9
     * Name of the trading pair
10
     * @required true
11
     * @var string $symbol
12
     */
13
    protected string $symbol;
14
15
    /**
16
     * Limit for data size. [1, 60]. Default: 60
17
     * @required false
18
     * @var int $limit
19
     */
20
    protected int $limit = 60;
21
22
    public function __construct()
23
    {
24
        $this->setRequiredField('symbol');
25
    }
26
27
    /**
28
     * @param string $symbol
29
     * @return PublicTradingRecordsRequest
30
     */
31
    public function setSymbol(string $symbol): self
32
    {
33
        $this->symbol = $symbol;
34
        return $this;
35
    }
36
37
    /**
38
     * @return string
39
     */
40
    public function getSymbol(): string
41
    {
42
        return $this->symbol;
43
    }
44
45
    /**
46
     * @param int $limit
47
     * @return PublicTradingRecordsRequest
48
     */
49
    public function setLimit(int $limit): self
50
    {
51
        $this->limit = $limit;
52
        return $this;
53
    }
54
55
    /**
56
     * @return int
57
     */
58
    public function getLimit(): int
59
    {
60
        return $this->limit;
61
    }
62
}