1 | <?php |
||
2 | |||
3 | namespace BeyondCode\LaravelWebSockets\Server; |
||
4 | |||
5 | use Ratchet\ConnectionInterface; |
||
6 | use stdClass; |
||
7 | |||
8 | class MockableConnection implements ConnectionInterface |
||
9 | { |
||
10 | /** |
||
11 | * Create a new Mockable connection. |
||
12 | * |
||
13 | * @param string|int $appId |
||
14 | * @param string $socketId |
||
15 | * @return void |
||
16 | */ |
||
17 | public function __construct($appId, string $socketId) |
||
18 | { |
||
19 | $this->app = new stdClass; |
||
0 ignored issues
–
show
Bug
Best Practice
introduced
by
![]() |
|||
20 | |||
21 | $this->app->id = $appId; |
||
22 | $this->socketId = $socketId; |
||
0 ignored issues
–
show
|
|||
23 | } |
||
24 | |||
25 | /** |
||
26 | * Send data to the connection. |
||
27 | * |
||
28 | * @param string $data |
||
29 | * @return \Ratchet\ConnectionInterface |
||
30 | */ |
||
31 | public function send($data) |
||
32 | { |
||
33 | // |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * Close the connection. |
||
38 | * |
||
39 | * @return void |
||
40 | */ |
||
41 | public function close() |
||
42 | { |
||
43 | // |
||
44 | } |
||
45 | } |
||
46 |