Total Complexity | 7 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | final class UdpHandler implements HandlerInterface |
||
13 | { |
||
14 | private ?Socket $socket = null; |
||
15 | |||
16 | public function __construct( |
||
22 | } |
||
23 | } |
||
24 | |||
25 | /** |
||
26 | * Sends encode with {@see \json_encode()} function $variable to a UDP socket. |
||
27 | */ |
||
28 | public function handle(mixed $variable, int $depth, bool $highlight = false): void |
||
39 | ) |
||
40 | ); |
||
41 | } |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * @throws RuntimeException When a connection cannot be opened. |
||
46 | */ |
||
47 | private function getSocket(): Socket |
||
58 |