| Conditions | 2 |
| Paths | 2 |
| Total Lines | 7 |
| Code Lines | 3 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | public static function make(string $className, IWebSocketArgumentInterface $arguments = null, Credentials $credentials = null, ChannelHandler $callback = null): IWebSocketsChannelInterface |
||
| 15 | { |
||
| 16 | if (!in_array(IWebSocketsChannelInterface::class, class_implements($className))) { |
||
| 17 | throw new \Exception("This websocket-channel {$className} must implement the interface " . IResponseHandlerInterface::class . "!"); |
||
| 18 | } |
||
| 19 | |||
| 20 | return new $className($arguments, $credentials, $callback); |
||
| 21 | } |
||
| 23 |