Passed
Push — master ( 420501...55c755 )
by Vladislav
04:26 queued 02:03
created

TickerInfoRequest::__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
namespace Carpenstar\ByBitAPI\Derivatives\MarketData\TickerInfo\Request;
3
4
use Carpenstar\ByBitAPI\Core\Objects\AbstractParameters;
5
6
class TickerInfoRequest extends AbstractParameters
7
{
8
    /**
9
     * Only linear category support at now
10
     * @var string $category
11
     */
12
    protected string $category = 'linear';
13
14
    protected string $symbol;
15
16
    public function __construct()
17
    {
18
        $this->setRequiredField('symbol');
19
    }
20
21
    public function getCategory(): string
22
    {
23
        return $this->category;
24
    }
25
26
    /**
27
     * @param string $symbol
28
     * @return TickerInfoRequest
29
     */
30
    public function setSymbol(string $symbol): self
31
    {
32
        $this->symbol = $symbol;
33
        return $this;
34
    }
35
36
    /**
37
     * @return string
38
     */
39
    public function getSymbol(): string
40
    {
41
        return $this->symbol;
42
    }
43
}