File tree 1 file changed +10
-3
lines changed
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -276,7 +276,7 @@ function_exists('pcntl_fork')
276
276
// IPC inspired from https://github.com/barracudanetworks/forkdaemon-php
277
277
private const SOCKET_HEADER_SIZE = 4 ;
278
278
279
- private function ipc_init ()
279
+ private function ipc_init (): array
280
280
{
281
281
// windows needs AF_INET
282
282
$ domain = strtoupper (substr (PHP_OS , 0 , 3 )) == 'WIN ' ? AF_INET : AF_UNIX ;
@@ -291,7 +291,10 @@ private function ipc_init()
291
291
return $ sockets ;
292
292
}
293
293
294
- private function socket_receive ($ socket )
294
+ /**
295
+ * @param resource $socket
296
+ */
297
+ private function socket_receive ($ socket ): mixed
295
298
{
296
299
// initially read to the length of the header size, then
297
300
// expand to read more
@@ -328,7 +331,11 @@ private function socket_receive($socket)
328
331
return @unserialize ($ socket_message );
329
332
}
330
333
331
- private function socket_send ($ socket , $ message )
334
+ /**
335
+ * @param resource $socket
336
+ * @param mixed $message
337
+ */
338
+ private function socket_send ($ socket , $ message ): void
332
339
{
333
340
$ serialized_message = @serialize ($ message );
334
341
if ($ serialized_message == false )
You can’t perform that action at this time.
0 commit comments