File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 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')
276276 // IPC inspired from https://github.com/barracudanetworks/forkdaemon-php
277277 private const SOCKET_HEADER_SIZE = 4 ;
278278
279- private function ipc_init ()
279+ private function ipc_init (): array
280280 {
281281 // windows needs AF_INET
282282 $ domain = strtoupper (substr (PHP_OS , 0 , 3 )) == 'WIN ' ? AF_INET : AF_UNIX ;
@@ -291,7 +291,10 @@ private function ipc_init()
291291 return $ sockets ;
292292 }
293293
294- private function socket_receive ($ socket )
294+ /**
295+ * @param resource $socket
296+ */
297+ private function socket_receive ($ socket ): mixed
295298 {
296299 // initially read to the length of the header size, then
297300 // expand to read more
@@ -328,7 +331,11 @@ private function socket_receive($socket)
328331 return @unserialize ($ socket_message );
329332 }
330333
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
332339 {
333340 $ serialized_message = @serialize ($ message );
334341 if ($ serialized_message == false )
You can’t perform that action at this time.
0 commit comments