RiskLimitsRequest::getCategory()   A
last analyzed

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\Derivatives\MarketData\RiskLimit\Request;
4
5
use Carpenstar\ByBitAPI\Core\Objects\AbstractParameters;
6
use Carpenstar\ByBitAPI\Derivatives\MarketData\RiskLimit\Interfaces\IRiskLimitsRequestInterface;
7
8
class RiskLimitsRequest extends AbstractParameters implements IRiskLimitsRequestInterface
9
{
10
    /**
11
     * Product type. linear
12
     * Only linear support, now
13
     * @var string $category
14
     */
15
    protected string $category = "linear";
16
17
    protected string $symbol;
18
19
    protected ?string $cursor;
20
21
    public function setSymbol(string $symbol): self
22
    {
23
        $this->symbol = $symbol;
24
        return $this;
25
    }
26
27
    /**
28
     * @return string
29
     */
30
    public function getSymbol(): string
31
    {
32
        return $this->symbol;
33
    }
34
35
    /**
36
     * @return string
37
     */
38
    public function getCategory(): string
39
    {
40
        return $this->category;
41
    }
42
43
    public function setCursor(string $cursor): self
44
    {
45
        $this->cursor = $cursor;
46
        return $this;
47
    }
48
49
    public function getCursor(): string
50
    {
51
        return $this->cursor;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->cursor could return the type null which is incompatible with the type-hinted return string. Consider adding an additional type-check to rule them out.
Loading history...
52
    }
53
}
54