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

BooktickerArgument   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
c 0
b 0
f 0
dl 0
loc 13
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\Bookticker\Argument;
4
5
use Carpenstar\ByBitAPI\Core\Enums\WebSocketTopicNameEnum;
6
use Carpenstar\ByBitAPI\Core\Objects\WebSockets\WebSocketArgument;
7
8
class BooktickerArgument extends WebSocketArgument
9
{
10
    /**
11
     * @return string[]
12
     */
13
    public function getTopic(): array
14
    {
15
        $topics = [];
16
        foreach (explode(',', $this->symbols) as $symbol) {
17
            $topics[] = WebSocketTopicNameEnum::SPOT_BOOKTICKER . ".{$symbol}";
18
        }
19
20
        return $topics;
21
    }
22
}
23