MyPositionRequest   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 10
c 2
b 0
f 0
dl 0
loc 53
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A setSymbol() 0 4 1
A __construct() 0 3 1
A getSymbol() 0 3 1
A getSettleCoin() 0 3 1
A setSettleCoin() 0 4 1
1
<?php
2
3
namespace Carpenstar\ByBitAPI\Derivatives\Contract\Position\MyPosition\Request;
4
5
use Carpenstar\ByBitAPI\Core\Objects\AbstractParameters;
6
use Carpenstar\ByBitAPI\Derivatives\Contract\Position\MyPosition\Interfaces\IMyPositionRequestInterface;
7
8
class MyPositionRequest extends AbstractParameters implements IMyPositionRequestInterface
9
{
10
    /**
11
     * Symbol name
12
     * @var string $symbol
13
     */
14
    protected string $symbol;
15
16
    /**
17
     * Settle coin. Either symbol or settleCoin is required. symbol has a higher priority
18
     * @var string $settleCoin
19
     */
20
    protected string $settleCoin;
21
22
    public function __construct()
23
    {
24
        $this->setRequiredBetweenField("symbol", "settleCoin");
25
    }
26
27
    /**
28
     * @param string $symbol
29
     * @return $this
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 string $symbol
47
     * @return $this
48
     */
49
    public function setSettleCoin(string $symbol): self
50
    {
51
        $this->settleCoin = $symbol;
52
        return $this;
53
    }
54
55
    /**
56
     * @return string
57
     */
58
    public function getSettleCoin(): string
59
    {
60
        return $this->settleCoin;
61
    }
62
}
63