Total Complexity | 3 |
Total Lines | 42 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | class SubscribeRawBooks implements Request |
||
14 | { |
||
15 | private const PRECISION = 'P0'; |
||
16 | |||
17 | /** @var string */ |
||
18 | private $symbol; |
||
19 | |||
20 | /** @var string */ |
||
21 | private $length; |
||
22 | |||
23 | /** |
||
24 | * SubscribeRawBooks constructor. |
||
25 | * @param string $symbol |
||
26 | * @param string $length |
||
27 | */ |
||
28 | 3 | public function __construct(string $symbol, string $length) |
|
32 | 3 | } |
|
33 | |||
34 | /** |
||
35 | * @return array |
||
36 | */ |
||
37 | 3 | public function getPayload(): array |
|
38 | { |
||
39 | return [ |
||
40 | 3 | 'event' => 'subscribe', |
|
41 | 3 | 'channel' => 'book', |
|
42 | 3 | 'symbol' => $this->symbol, |
|
43 | 3 | 'prec' => self::PRECISION, |
|
44 | 3 | 'len' => $this->length, |
|
45 | |||
46 | ]; |
||
47 | } |
||
48 | |||
49 | /** |
||
50 | * @return Frame |
||
51 | */ |
||
52 | 2 | public function getFrame(): Frame |
|
55 | } |
||
56 | } |
||
57 |