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