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