@@ -10,7 +10,7 @@ |
||
| 10 | 10 | |
| 11 | 11 | public function getTopic(): array |
| 12 | 12 | { |
| 13 | - return [WebSocketTopicNameEnum::PUBLIC_TRADE.".{$this->getSymbol()}"]; |
|
| 13 | + return [WebSocketTopicNameEnum::PUBLIC_TRADE . ".{$this->getSymbol()}"]; |
|
| 14 | 14 | } |
| 15 | 15 | |
| 16 | 16 | public function getOperation(): string |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | |
| 11 | 11 | public function getTopic(): array |
| 12 | 12 | { |
| 13 | - return [WebSocketTopicNameEnum::TICKERS.".{$this->getSymbol()}"]; |
|
| 13 | + return [WebSocketTopicNameEnum::TICKERS . ".{$this->getSymbol()}"]; |
|
| 14 | 14 | } |
| 15 | 15 | |
| 16 | 16 | public function getOperation(): string |
@@ -253,7 +253,7 @@ |
||
| 253 | 253 | private function setTimestamp(?string $timestamp): self |
| 254 | 254 | { |
| 255 | 255 | if (!empty($timestamp)) { |
| 256 | - $this->timestamp = DateTimeHelper::makeFromTimestamp($timestamp); |
|
| 256 | + $this->timestamp = DateTimeHelper::makeFromTimestamp($timestamp); |
|
| 257 | 257 | } |
| 258 | 258 | return $this; |
| 259 | 259 | } |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function getTopic(): array |
| 15 | 15 | { |
| 16 | - return [WebSocketTopicNameEnum::ORDERBOOK.".40.{$this->getSymbol()}"]; |
|
| 16 | + return [WebSocketTopicNameEnum::ORDERBOOK . ".40.{$this->getSymbol()}"]; |
|
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | /** |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | $askCollection = new EntityCollection(); |
| 162 | 162 | |
| 163 | 163 | if (!empty($asks)) { |
| 164 | - array_map(function ($askItem) use ($askCollection) { |
|
| 164 | + array_map(function($askItem) use ($askCollection) { |
|
| 165 | 165 | $askCollection->push(ResponseBuilder::make(OrderBookPriceDTO::class, $askItem)); |
| 166 | 166 | }, $asks); |
| 167 | 167 | } |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | $bidCollection = new EntityCollection(); |
| 189 | 189 | |
| 190 | 190 | if (!empty($bids)) { |
| 191 | - array_map(function ($bidItem) use ($bidCollection) { |
|
| 191 | + array_map(function($bidItem) use ($bidCollection) { |
|
| 192 | 192 | $bidCollection->push(ResponseBuilder::make(OrderBookPriceDTO::class, $bidItem)); |
| 193 | 193 | }, $bids); |
| 194 | 194 | } |
@@ -413,7 +413,7 @@ |
||
| 413 | 413 | private function setNextFundingTime(?string $nextFundingTime): self |
| 414 | 414 | { |
| 415 | 415 | if (!empty($nextFundingTime)) { |
| 416 | - $this->nextFundingTime = DateTimeHelper::makeFromTimestamp($nextFundingTime); |
|
| 416 | + $this->nextFundingTime = DateTimeHelper::makeFromTimestamp($nextFundingTime); |
|
| 417 | 417 | } |
| 418 | 418 | return $this; |
| 419 | 419 | } |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | |
| 20 | 20 | public function getTopic(): array |
| 21 | 21 | { |
| 22 | - return [WebSocketTopicNameEnum::ORDERBOOK.".{$this->getDepth()}.{$this->getSymbol()}"]; |
|
| 22 | + return [WebSocketTopicNameEnum::ORDERBOOK . ".{$this->getDepth()}.{$this->getSymbol()}"]; |
|
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | public function getOperation(): string |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | $askCollection = new EntityCollection(); |
| 140 | 140 | |
| 141 | 141 | if (!empty($asks)) { |
| 142 | - array_map(function ($askItem) use ($askCollection) { |
|
| 142 | + array_map(function($askItem) use ($askCollection) { |
|
| 143 | 143 | $askCollection->push(ResponseBuilder::make(OrderBookPriceEntity::class, $askItem)); |
| 144 | 144 | }, $asks); |
| 145 | 145 | } |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | $bidCollection = new EntityCollection(); |
| 159 | 159 | |
| 160 | 160 | if (!empty($bids)) { |
| 161 | - array_map(function ($bidItem) use ($bidCollection) { |
|
| 161 | + array_map(function($bidItem) use ($bidCollection) { |
|
| 162 | 162 | $bidCollection->push(ResponseBuilder::make(OrderBookPriceEntity::class, $bidItem)); |
| 163 | 163 | }, $bids); |
| 164 | 164 | } |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | class WebSocketsBuilder implements IFabricInterface |
| 11 | 11 | { |
| 12 | 12 | |
| 13 | - public static function make(string $className, IWebSocketArgumentInterface $arguments = null, ChannelHandler $channelHandler = null, int $mode = 0, int $wsClientTimeout = IWebSocketArgumentInterface::DEFAULT_SOCKET_CLIENT_TIMEOUT): IWebSocketsChannelInterface |
|
| 13 | + public static function make(string $className, IWebSocketArgumentInterface $arguments = null, ChannelHandler $channelHandler = null, int $mode = 0, int $wsClientTimeout = IWebSocketArgumentInterface::DEFAULT_SOCKET_CLIENT_TIMEOUT): IWebSocketsChannelInterface |
|
| 14 | 14 | { |
| 15 | 15 | if (!in_array(IWebSocketsChannelInterface::class, class_implements($className))) { |
| 16 | 16 | throw new \Exception("This websocket-channel {$className} must implement the interface " . IResponseInterface::class . "!"); |