Issues (1019)

src/Swoole/Socket/WebSocketInterface.php (36 issues)

1
<?php
2
0 ignored issues
show
Missing file doc comment
Loading history...
3
namespace Hhxsv5\LaravelS\Swoole\Socket;
4
5
use Swoole\Http\Request;
6
use Swoole\Http\Response;
7
use Swoole\WebSocket\Frame;
8
use Swoole\WebSocket\Server;
9
10
interface WebSocketInterface
0 ignored issues
show
Missing doc comment for interface WebSocketInterface
Loading history...
11
{
12
    /**
13
     * The function is executed when a WebSocket connection is established and going into the handshake stage.
14
     * The built-in default handshake protocol is Sec-WebSocket-Version: 13. You can override the default handshake protocol by implementing this function.
15
     * After the onHandShake event is set, the onOpen event will not be triggered, and onOpen can be called manually
16
     * This function is optional to create a WebSocket server.
17
     * @see https://www.swoole.co.uk/docs/modules/swoole-websocket-server-on-handshake
0 ignored issues
show
There must be exactly one blank line before the tags in a doc comment
Loading history...
Tag @see cannot be grouped with parameter tags in a doc comment
Loading history...
Tag value for @see tag indented incorrectly; expected 4 spaces but found 1
Loading history...
18
     * @param Request $request
0 ignored issues
show
Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
Loading history...
19
     * @param Response $response
0 ignored issues
show
Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
Loading history...
20
     * @return void
0 ignored issues
show
Tag @return cannot be grouped with parameter tags in a doc comment
Loading history...
21
     */
22
    // public function onHandShake(Request $request, Response $response);
23
24
    /**
25
     * The function is executed when a new WebSocket connection is established and passed the handshake stage.
26
     * @see https://www.swoole.co.uk/docs/modules/swoole-websocket-server-on-open
0 ignored issues
show
There must be exactly one blank line before the tags in a doc comment
Loading history...
Tag @see cannot be grouped with parameter tags in a doc comment
Loading history...
Tag value for @see tag indented incorrectly; expected 4 spaces but found 1
Loading history...
27
     * @param Server $server
0 ignored issues
show
Missing parameter comment
Loading history...
Expected 2 spaces after parameter type; 1 found
Loading history...
Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
Loading history...
28
     * @param Request $request
0 ignored issues
show
Missing parameter comment
Loading history...
Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
Loading history...
29
     * @return void
0 ignored issues
show
Tag @return cannot be grouped with parameter tags in a doc comment
Loading history...
30
     */
31
    public function onOpen(Server $server, Request $request);
32
33
    /**
34
     * The function is executed when a new data Frame is received by the WebSocket Server. The logics of processing the request from the WebSocket client should be defined within this function.
35
     * @see https://www.swoole.co.uk/docs/modules/swoole-websocket-server-on-message
0 ignored issues
show
There must be exactly one blank line before the tags in a doc comment
Loading history...
Tag @see cannot be grouped with parameter tags in a doc comment
Loading history...
Tag value for @see tag indented incorrectly; expected 4 spaces but found 1
Loading history...
36
     * @param Server $server
0 ignored issues
show
Missing parameter comment
Loading history...
Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
Loading history...
37
     * @param Frame $frame
0 ignored issues
show
Missing parameter comment
Loading history...
Expected 2 spaces after parameter type; 1 found
Loading history...
Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
Loading history...
38
     * @return void
0 ignored issues
show
Tag @return cannot be grouped with parameter tags in a doc comment
Loading history...
39
     */
40
    public function onMessage(Server $server, Frame $frame);
41
42
    /**
43
     * The function is executed when a new WebSocket connection is closed.
44
     * @see https://www.swoole.co.uk/docs/modules/swoole-websocket-server-on-close
0 ignored issues
show
There must be exactly one blank line before the tags in a doc comment
Loading history...
Tag @see cannot be grouped with parameter tags in a doc comment
Loading history...
Tag value for @see tag indented incorrectly; expected 4 spaces but found 1
Loading history...
45
     * @param Server $server
0 ignored issues
show
Missing parameter comment
Loading history...
Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
Loading history...
46
     * @param $fd
0 ignored issues
show
Missing parameter comment
Loading history...
Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
Loading history...
47
     * @param $reactorId
0 ignored issues
show
Missing parameter comment
Loading history...
Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
Loading history...
48
     * @return void
0 ignored issues
show
Tag @return cannot be grouped with parameter tags in a doc comment
Loading history...
49
     */
50
    public function onClose(Server $server, $fd, $reactorId);
51
}