| 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 | public function __construct(Client $websocket) |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Get Websocket |
||
| 32 | * |
||
| 33 | * @return WebSocket\Client |
||
| 34 | */ |
||
| 35 | public function getWebsocket() |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Publish Channel |
||
| 42 | * |
||
| 43 | * @param string $channel |
||
| 44 | * @param mixed $data |
||
| 45 | * @param Closure|null $callback |
||
| 46 | * |
||
| 47 | * @return void |
||
| 48 | */ |
||
| 49 | public function publish($channel, $data, Closure $callback = null) |
||
| 58 | |||
| 59 | /** |
||
| 60 | * Emit Event |
||
| 61 | * |
||
| 62 | * @param string $event |
||
| 63 | * @param array $data |
||
| 64 | * @param Closure|null $callback |
||
| 65 | * |
||
| 66 | * @return void |
||
| 67 | */ |
||
| 68 | public function emit($event, array $data, Closure $callback = null) |
||
| 89 | |||
| 90 | /** |
||
| 91 | * Receive |
||
| 92 | * |
||
| 93 | * @return string |
||
| 94 | */ |
||
| 95 | public function receive() |
||
| 99 | |||
| 100 | /** |
||
| 101 | * Get Error |
||
| 102 | * |
||
| 103 | * @return string|null |
||
| 104 | */ |
||
| 105 | public function error() |
||
| 109 | } |
||
| 110 |
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..