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

TickersChannel   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 getOperation() 0 3 1
A getResponseClassname() 0 3 1
1
<?php
2
3
namespace Carpenstar\ByBitAPI\WebSockets\Spot\PublicChannels\Tickers;
4
5
use Carpenstar\ByBitAPI\Core\Enums\WebSocketOperationsEnum;
6
use Carpenstar\ByBitAPI\Core\Objects\WebSockets\WebSocketsSpotPublicChannel;
7
use Carpenstar\ByBitAPI\WebSockets\Spot\PublicChannels\Tickers\Entities\TickersResponse;
8
9
/**
10
 * https://bybit-exchange.github.io/docs/spot/ws-public/ticker
11
 *
12
 * Topic: tickers.{symbol}
13
 *
14
 * The 24-hr statistics of a trading pair.
15
 * Push frequency: real-time
16
 */
17
class TickersChannel extends WebSocketsSpotPublicChannel
18
{
19
    /**
20
     * @return string
21
     */
22
    public function getResponseClassname(): string
23
    {
24
        return TickersResponse::class;
25
    }
26
27
    public function getOperation(): string
28
    {
29
        return WebSocketOperationsEnum::SUBSCRIBE;
30
    }
31
}
32