Passed
Pull Request — master (#31)
by Vladislav
07:58
created

WebSocketArgument::getReqId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Carpenstar\ByBitAPI\Core\Objects\WebSockets;
4
5
use Carpenstar\ByBitAPI\Core\Interfaces\IWebSocketArgumentInterface;
6
7
abstract class WebSocketArgument implements IWebSocketArgumentInterface
8
{
9
    public const STREAM_TYPES = ['spot', 'linear', 'option', 'inverse'];
10
    protected string $streamType;
11
    protected array $symbols;
12
13
    public function __construct(array $symbols, string $streamType)
14
    {
15
        $this->symbols = $symbols;
16
        $this->streamType = $streamType;
17
    }
18
19
    /**
20
     * Получение списка торговых символов
21
     *
22
     * @return array
23
     */
24
    public function getSymbols(): array
25
    {
26
        return $this->symbols;
27
    }
28
29
    /**
30
     * Получение алиаса потока
31
     *
32
     * @return string
33
     */
34
    public function getStreamType(): string
35
    {
36
        return $this->streamType;
37
    }
38
}
39