OrderBookArgument   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
c 0
b 0
f 0
dl 0
loc 16
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\OrderBook\Argument;
4
5
use Carpenstar\ByBitAPI\Core\Enums\WebSocketTopicNameEnum;
6
use Carpenstar\ByBitAPI\Core\Objects\WebSockets\WebSocketArgument;
7
8
class OrderBookArgument extends WebSocketArgument
9
{
10
    private int $depth;
0 ignored issues
show
introduced by
The private property $depth is not used, and could be removed.
Loading history...
11
12
    /**
13
     * @return array
14
     * @throws \Exception
15
     */
16
    public function getTopic(): array
17
    {
18
        $topics = [];
19
        foreach (explode(',', $this->symbols) as $symbol) {
20
            $topics[] = WebSocketTopicNameEnum::SPOT_ORDERBOOK . ".40." . $symbol;
21
        }
22
23
        return $topics;
24
    }
25
}
26