Passed
Pull Request — master (#10)
by Vladislav
03:04
created

MyPositionRequest::setSettleCoin()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 4
rs 10
1
<?php
2
namespace Carpenstar\ByBitAPI\Derivatives\Contract\Position\MyPosition\Request;
3
4
use Carpenstar\ByBitAPI\Core\Objects\AbstractParameters;
5
use Carpenstar\ByBitAPI\Derivatives\Contract\Position\MyPosition\Interfaces\IMyPositionRequestInterface;
6
7
class MyPositionRequest extends AbstractParameters implements IMyPositionRequestInterface
8
{
9
    /**
10
     * Symbol name
11
     * @var string $symbol
12
     */
13
    protected string $symbol;
14
15
    /**
16
     * Settle coin. Either symbol or settleCoin is required. symbol has a higher priority
17
     * @var string $settleCoin
18
     */
19
    protected string $settleCoin;
20
21
    public function __construct()
22
    {
23
        $this->setRequiredBetweenField("symbol", "settleCoin");
24
    }
25
26
    /**
27
     * @param string $symbol
28
     * @return $this
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
44
    /**
45
     * @param string $symbol
46
     * @return $this
47
     */
48
    public function setSettleCoin(string $symbol): self
49
    {
50
        $this->settleCoin = $symbol;
51
        return $this;
52
    }
53
54
    /**
55
     * @return string
56
     */
57
    public function getSettleCoin(): string
58
    {
59
        return $this->settleCoin;
60
    }
61
}