Test Failed
Push — master ( 1fab6c...a74bfc )
by Vladislav
17:54 queued 15:22
created

SetLeverageRequest::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 2
b 0
f 0
nc 1
nop 0
dl 0
loc 6
rs 10
1
<?php
2
3
namespace Carpenstar\ByBitAPI\Derivatives\Contract\Position\SetLeverage\Request;
4
5
use Carpenstar\ByBitAPI\Core\Objects\AbstractParameters;
6
use Carpenstar\ByBitAPI\Derivatives\Contract\Position\SetLeverage\Interfaces\ISetLeverageRequestInterface;
7
8
class SetLeverageRequest extends AbstractParameters implements ISetLeverageRequestInterface
9
{
10
    /**
11
     * Symbol name
12
     * @var string $symbol
13
     */
14
    protected string $symbol;
15
16
    /**
17
     * (0, max leverage of corresponding risk limit]. For one-way mode, make sure buyLeverage=sellLeverage
18
     * @var float $buyLeverage
19
     */
20
    protected float $buyLeverage;
21
22
    /**
23
     * (0, max leverage of corresponding risk limit]. For one-way mode, make sure buyLeverage=sellLeverage
24
     * @var float $sellLeverage
25
     */
26
    protected float $sellLeverage;
27
28
    /**
29
     * @return string
30
     */
31
    public function getSymbol(): string
32
    {
33
        return $this->symbol;
34
    }
35
36
    /**
37
     * @param string $symbol
38
     * @return SetLeverageRequest
39
     */
40
    public function setSymbol(string $symbol): self
41
    {
42
        $this->symbol = $symbol;
43
        return $this;
44
    }
45
46
    /**
47
     * @return float
48
     */
49
    public function getBuyLeverage(): float
50
    {
51
        return $this->buyLeverage;
52
    }
53
54
    /**
55
     * @param float $buyLeverage
56
     * @return SetLeverageRequest
57
     */
58
    public function setBuyLeverage(float $buyLeverage): self
59
    {
60
        $this->buyLeverage = $buyLeverage;
61
        return $this;
62
    }
63
64
    /**
65
     * @return float
66
     */
67
    public function getSellLeverage(): float
68
    {
69
        return $this->sellLeverage;
70
    }
71
72
    /**
73
     * @param float $sellLeverage
74
     * @return SetLeverageRequest
75
     */
76
    public function setSellLeverage(float $sellLeverage): self
77
    {
78
        $this->sellLeverage = $sellLeverage;
79
        return $this;
80
    }
81
82
83
}
84