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){ |
||||||
|
0 ignored issues
–
show
The parameter
$wbs is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. Loading history...
|
|||||||
| 13 | |||||||
| 14 | }); |
||||||
| 15 | |||||||
| 16 | $wbs->on('open', function(Server $wbs, Request $req){ |
||||||
|
0 ignored issues
–
show
The parameter
$req is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. Loading history...
The parameter
$wbs is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. Loading history...
|
|||||||
| 17 | |||||||
| 18 | }); |
||||||
| 19 | |||||||
| 20 | $wbs->on('message', function(Server $wbs, Frame $frame){ |
||||||
|
0 ignored issues
–
show
The parameter
$wbs is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. Loading history...
The parameter
$frame is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. Loading history...
|
|||||||
| 21 | |||||||
| 22 | }); |
||||||
| 23 | |||||||
| 24 | $wbs->on('close', function(Server $server, int $fd){ |
||||||
|
0 ignored issues
–
show
The parameter
$fd is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. Loading history...
The parameter
$server is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. Loading history...
|
|||||||
| 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