TickerInfoRequest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
dl 0
loc 31
rs 10
c 1
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getCategory() 0 3 1
A getSymbol() 0 3 1
A setSymbol() 0 4 1
1
<?php
2
3
namespace Carpenstar\ByBitAPI\Derivatives\MarketData\TickerInfo\Request;
4
5
use Carpenstar\ByBitAPI\Core\Objects\AbstractParameters;
6
use Carpenstar\ByBitAPI\Derivatives\MarketData\TickerInfo\Interfaces\ITickerInfoRequestInterface;
7
8
class TickerInfoRequest extends AbstractParameters implements ITickerInfoRequestInterface
9
{
10
    /**
11
     * Only linear category support at now
12
     * @var string $category
13
     */
14
    protected string $category = 'linear';
15
16
    protected string $symbol;
17
18
    public function getCategory(): string
19
    {
20
        return $this->category;
21
    }
22
23
    /**
24
     * @param string $symbol
25
     * @return TickerInfoRequest
26
     */
27
    public function setSymbol(string $symbol): self
28
    {
29
        $this->symbol = $symbol;
30
        return $this;
31
    }
32
33
    /**
34
     * @return string
35
     */
36
    public function getSymbol(): string
37
    {
38
        return $this->symbol;
39
    }
40
}
41