Passed
Pull Request — master (#10)
by Vladislav
15:29 queued 07:37
created

TickersArgument::getOperation()   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
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace Carpenstar\ByBitAPI\WebSockets\Channels\Spot\PublicChannels\Tickers\Argument;
4
5
use Carpenstar\ByBitAPI\WebSockets\Enums\WebSocketTopicNameEnum;
6
use Carpenstar\ByBitAPI\WebSockets\Objects\WebSockets\WebSocketArgument;
7
8
class TickersArgument extends WebSocketArgument
9
{
10
    public function getTopic(): array
11
    {
12
        $topics = [];
13
        foreach (explode(',', $this->symbols) as $symbol) {
14
            $topics[] = WebSocketTopicNameEnum::SPOT_TICKERS.".{$symbol}";
15
        }
16
17
        return $topics;
18
    }
19
}
20