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

SwitchPositionModeRequest   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 72
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 13
dl 0
loc 72
rs 10
c 2
b 0
f 0
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getSymbol() 0 3 1
A getMode() 0 3 1
A setMode() 0 4 1
A setCoin() 0 4 1
A getCoin() 0 3 1
A setSymbol() 0 4 1
1
<?php
2
3
namespace Carpenstar\ByBitAPI\Derivatives\Contract\Position\SwitchPositionMode\Request;
4
5
use Carpenstar\ByBitAPI\Core\Objects\AbstractParameters;
6
use Carpenstar\ByBitAPI\Derivatives\Contract\Position\SwitchPositionMode\Interfaces\ISwitchPositionModeRequestInterface;
7
8
class SwitchPositionModeRequest extends AbstractParameters implements ISwitchPositionModeRequestInterface
9
{
10
    /**
11
     * Symbol name. Either symbol or coin is required. symbol has a higher priority
12
     * @var string $symbol
13
     */
14
    protected string $symbol;
15
16
    /**
17
     * Coin
18
     * @var string $coin
19
     */
20
    protected string $coin;
21
22
    /**
23
     * Position mode. 0: Merged Single. 3: Both Side
24
     * @var int $mode
25
     */
26
    protected int $mode;
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 SwitchPositionModeRequest
39
     */
40
    public function setSymbol(string $symbol): self
41
    {
42
        $this->symbol = $symbol;
43
        return $this;
44
    }
45
46
    /**
47
     * @return string
48
     */
49
    public function getCoin(): string
50
    {
51
        return $this->coin;
52
    }
53
54
    /**
55
     * @param string $coin
56
     * @return SwitchPositionModeRequest
57
     */
58
    public function setCoin(string $coin): self
59
    {
60
        $this->coin = $coin;
61
        return $this;
62
    }
63
64
    /**
65
     * @return int
66
     */
67
    public function getMode(): int
68
    {
69
        return $this->mode;
70
    }
71
72
    /**
73
     * @param int $mode
74
     * @return SwitchPositionModeRequest
75
     */
76
    public function setMode(int $mode): self
77
    {
78
        $this->mode = $mode;
79
        return $this;
80
    }
81
82
83
}
84