Total Complexity | 3 |
Total Lines | 18 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class KlineArgument extends WebSocketArgument |
||
11 | { |
||
12 | private string $interval; |
||
13 | |||
14 | public function __construct(string $symbol, int $interval) |
||
15 | { |
||
16 | parent::__construct($symbol); |
||
17 | |||
18 | if (!in_array($interval, WebSocketDerivativesIntervalEnum::ALL)) { |
||
19 | throw new \Exception("Invalid interval {$interval} specified. See the list of available intervals in the file: " . WebSocketDerivativesIntervalEnum::class); |
||
20 | } |
||
21 | |||
22 | $this->interval = $interval; |
||
23 | } |
||
24 | |||
25 | public function getTopic(): array |
||
28 | } |
||
29 | } |