| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 28 | public function handle(mixed $variable, int $depth, bool $highlight = false): void |
||
| 29 | { |
||
| 30 | $socket = $this->getSocket(); |
||
| 31 | |||
| 32 | $data = json_encode($variable); |
||
| 33 | if (!socket_sendto($socket, $data, strlen($data), 0, $this->host, $this->port)) { |
||
| 34 | throw new RuntimeException( |
||
| 35 | sprintf( |
||
| 36 | 'Could not send a dump to %s:%d', |
||
| 37 | $this->host, |
||
| 38 | $this->port, |
||
| 39 | ) |
||
| 58 |