Passed
Push — master ( 1b5ca4...e52b3a )
by Vladislav
17:19 queued 15:01
created

OrderBookArgument::setDepth()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 4
rs 10
1
<?php
2
3
namespace Carpenstar\ByBitAPI\WebSockets\Channels\Spot\PublicChannels\OrderBook\Argument;
4
5
use Carpenstar\ByBitAPI\WebSockets\Enums\WebSocketTopicNameEnum;
6
use Carpenstar\ByBitAPI\WebSockets\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