Conditions | 2 |
Paths | 3 |
Total Lines | 21 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
59 | public function emit($event, array $data, Closure $callback = null) |
||
60 | { |
||
61 | try { |
||
62 | $eventData = [ |
||
63 | 'event' => $event, |
||
64 | 'data' => $data, |
||
65 | ]; |
||
66 | |||
67 | $sendData = (string) @json_encode($eventData); |
||
68 | |||
69 | $this->websocket->send($sendData); |
||
70 | |||
71 | $this->error = null; |
||
72 | |||
73 | return true; |
||
74 | |||
75 | } catch (Exception $e) { |
||
76 | $this->error = $e->getMessage(); |
||
77 | return false; |
||
78 | } |
||
79 | } |
||
80 | |||
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..