ghostjat /
php-darknet
| 1 | <?php |
||
| 2 | declare (strict_types=1); |
||
| 3 | if (!extension_loaded('swoole')) { |
||
| 4 | dl('swoole.so'); |
||
| 5 | } |
||
| 6 | |||
| 7 | use Swoole\WebSocket\Server; |
||
|
0 ignored issues
–
show
|
|||
| 8 | use Swoole\Http\Request; |
||
|
0 ignored issues
–
show
The type
Swoole\Http\Request was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 9 | use Swoole\WebSocket\Frame; |
||
|
0 ignored issues
–
show
The type
Swoole\WebSocket\Frame was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 10 | |||
| 11 | $wbs = new Server("0.0.0.0",8080); |
||
| 12 | $wbs->on('start', function(Server $wbs){ |
||
| 13 | |||
| 14 | }); |
||
| 15 | |||
| 16 | $wbs->on('open', function(Server $wbs, Request $req){ |
||
| 17 | |||
| 18 | }); |
||
| 19 | |||
| 20 | $wbs->on('message', function(Server $wbs, Frame $frame){ |
||
| 21 | |||
| 22 | }); |
||
| 23 | |||
| 24 | $wbs->on('close', function(Server $server, int $fd){ |
||
| 25 | |||
| 26 | }); |
||
| 27 | |||
| 28 | $wbs->start(); |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths