Passed
Push — master ( 8ca73d...2eaf19 )
by Vladislav
02:37 queued 15s
created

PublicTradeArgument   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getTopic() 0 8 2
1
<?php
2
3
namespace Carpenstar\ByBitAPI\WebSockets\Spot\PublicChannels\PublicTrade\Argument;
4
5
use Carpenstar\ByBitAPI\Core\Enums\WebSocketTopicNameEnum;
6
use Carpenstar\ByBitAPI\Core\Objects\WebSockets\WebSocketArgument;
7
8
class PublicTradeArgument extends WebSocketArgument
9
{
10
    public function getTopic(): array
11
    {
12
        $topics = [];
13
        foreach (explode(',', $this->symbols) as $symbol) {
14
            $topics[] = WebSocketTopicNameEnum::SPOT_PUBLIC_TRADE.".{$symbol}";
15
        }
16
17
        return $topics;
18
    }
19
}
20