| Conditions | 1 |
| Paths | 1 |
| Total Lines | 21 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | public function __invoke(array $config): void |
||
| 16 | { |
||
| 17 | $loop = Factory::create(); |
||
| 18 | $application = new Application(); |
||
| 19 | $loop->addTimer(0.001, function($timer) use ($config) { |
||
|
|
|||
| 20 | echo \sprintf("Socket server listening to tcp://%s.\n", $config['uri']); |
||
| 21 | }); |
||
| 22 | |||
| 23 | $webSocket = new \React\Socket\Server($config['uri'], $loop); |
||
| 24 | $server = new IoServer( |
||
| 25 | new HttpServer( |
||
| 26 | new WsServer( |
||
| 27 | new WampServer( |
||
| 28 | $application |
||
| 29 | ) |
||
| 30 | ) |
||
| 31 | ), |
||
| 32 | $webSocket |
||
| 33 | ); |
||
| 34 | |||
| 35 | $loop->run(); |
||
| 36 | } |
||
| 38 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.