Skip to content

Commit a3acb96

Browse files
committed
types
1 parent adccd7e commit a3acb96

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/Framework/TestRunner.php

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)