1 | <?php |
||
8 | class SocketCluster |
||
9 | { |
||
10 | /** |
||
11 | * @var WebSocket\Client |
||
12 | */ |
||
13 | protected $websocket; |
||
14 | |||
15 | /** |
||
16 | * @var string |
||
17 | */ |
||
18 | protected $error; |
||
19 | |||
20 | /** |
||
21 | * Construct |
||
22 | * |
||
23 | * @param WebSocket\Client $websocket |
||
24 | */ |
||
25 | 5 | public function __construct(Client $websocket) |
|
29 | |||
30 | /** |
||
31 | * Publish Channel |
||
32 | * |
||
33 | * @param string $channel |
||
34 | * @param mixed $data |
||
35 | 2 | * @param Closure|null $callback |
|
36 | * |
||
37 | 2 | * @return boolean |
|
38 | */ |
||
39 | public function publish($channel, $data, Closure $callback = null) |
||
48 | |||
49 | 1 | /** |
|
50 | * Emit Event |
||
51 | * |
||
52 | 1 | * @param string $event |
|
53 | 1 | * @param array $data |
|
54 | 1 | * @param Closure|null $callback |
|
55 | * |
||
56 | 1 | * @return boolean |
|
57 | */ |
||
58 | protected function emit($event, array $data, Closure $callback = null) |
||
79 | |||
80 | 2 | /** |
|
81 | * Get Error |
||
82 | 2 | * |
|
83 | * @return string |
||
84 | 1 | */ |
|
85 | 1 | public function error() |
|
89 | } |
||
90 |
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..