| Total Complexity | 3 |
| Total Lines | 51 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | class SubscribeBooks implements Request |
||
| 14 | { |
||
| 15 | /** @var string */ |
||
| 16 | private $symbol; |
||
| 17 | |||
| 18 | /** @var string */ |
||
| 19 | private $precision; |
||
| 20 | |||
| 21 | /** @var string */ |
||
| 22 | private $frequency; |
||
| 23 | |||
| 24 | /** @var string */ |
||
| 25 | private $length; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * SubscribeBooks constructor. |
||
| 29 | * @param string $symbol |
||
| 30 | * @param string $precision |
||
| 31 | * @param string $frequency |
||
| 32 | * @param string $length |
||
| 33 | */ |
||
| 34 | 3 | public function __construct(string $symbol, string $precision, string $frequency, string $length) |
|
| 40 | 3 | } |
|
| 41 | |||
| 42 | /** |
||
| 43 | * @return array |
||
| 44 | */ |
||
| 45 | 3 | public function getPayload(): array |
|
| 46 | { |
||
| 47 | return [ |
||
| 48 | 3 | 'event' => 'subscribe', |
|
| 49 | 3 | 'channel' => 'book', |
|
| 50 | 3 | 'symbol' => $this->symbol, |
|
| 51 | 3 | 'prec' => $this->precision, |
|
| 52 | 3 | 'freq' => $this->frequency, |
|
| 53 | 3 | 'len' => $this->length, |
|
| 54 | |||
| 55 | ]; |
||
| 56 | } |
||
| 57 | |||
| 58 | /** |
||
| 59 | * @return Frame |
||
| 60 | */ |
||
| 61 | 2 | public function getFrame(): Frame |
|
| 64 | } |
||
| 65 | } |
||
| 66 |