1 | <?php |
||
9 | class SocketCluster |
||
10 | { |
||
11 | /** |
||
12 | * @var WebSocket\Client |
||
13 | */ |
||
14 | protected $websocket; |
||
15 | |||
16 | /** |
||
17 | * @var string |
||
18 | */ |
||
19 | protected $error; |
||
20 | |||
21 | /** |
||
22 | * Construct |
||
23 | * |
||
24 | * @param Client $websocket Websocket |
||
25 | */ |
||
26 | public function __construct(Client $websocket) |
||
30 | |||
31 | /** |
||
32 | * Publish Channel |
||
33 | * |
||
34 | * @param string $channel |
||
35 | * @param mixed $data |
||
36 | * @param Closure|null $callback |
||
37 | * |
||
38 | * @return void |
||
39 | */ |
||
40 | public function publish($channel, $data, Closure $callback = null) |
||
49 | |||
50 | /** |
||
51 | * Emit Event |
||
52 | * |
||
53 | * @param string $event |
||
54 | * @param array $data |
||
55 | * @param Closure|null $callback |
||
56 | * |
||
57 | * @return void |
||
58 | */ |
||
59 | public function emit($event, array $data, Closure $callback = null) |
||
80 | |||
81 | /** |
||
82 | * Receive |
||
83 | * |
||
84 | * @return string |
||
85 | */ |
||
86 | public function receive() |
||
90 | |||
91 | /** |
||
92 | * Get Error |
||
93 | * |
||
94 | * @return string|null |
||
95 | */ |
||
96 | public function error() |
||
100 | } |
||
101 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..