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

BooktickerChannel   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getResponseClassname() 0 3 1
A getOperation() 0 3 1
1
<?php
2
3
namespace Carpenstar\ByBitAPI\WebSockets\Spot\PublicChannels\Bookticker;
4
5
use Carpenstar\ByBitAPI\Core\Enums\WebSocketOperationsEnum;
6
use Carpenstar\ByBitAPI\Core\Objects\WebSockets\WebSocketsSpotPublicChannel;
7
use Carpenstar\ByBitAPI\WebSockets\Spot\PublicChannels\Bookticker\Entities\BooktickerResponse;
8
9
/**
10
 * https://bybit-exchange.github.io/docs/spot/ws-public/bookticker
11
 *
12
 * Topic: bookticker.{symbol}
13
 *
14
 * Best bid price and best ask price
15
 * Push frequency: 100ms
16
 *
17
 */
18
class BooktickerChannel extends WebSocketsSpotPublicChannel
19
{
20
    public function getResponseClassname(): string
21
    {
22
        return BooktickerResponse::class;
23
    }
24
25
    /**
26
     * @return string
27
     */
28
    public function getOperation(): string
29
    {
30
        return WebSocketOperationsEnum::SUBSCRIBE;
31
    }
32
}
33