We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c8a9b2f commit e8ee74fCopy full SHA for e8ee74f
1 file changed
src/Parallel/Process.php
@@ -26,10 +26,10 @@ class Process
26
/** @var resource */
27
private $stdErr;
28
29
- /** @var callable */
+ /** @var callable(mixed[] $json) : void */
30
private $onData;
31
32
+ /** @var callable(\Throwable $exception) : void */
33
private $onError;
34
35
private ?TimerInterface $timer = null;
@@ -45,6 +45,11 @@ public function __construct(
45
$this->timeoutSeconds = $timeoutSeconds;
46
}
47
48
+ /**
49
+ * @param callable(mixed[] $json) : void $onData
50
+ * @param callable(\Throwable $exception) : void $onError
51
+ * @param callable(?int $exitCode, string $output) : void $onExit
52
+ */
53
public function start(callable $onData, callable $onError, callable $onExit): void
54
{
55
$tmpStdOut = tmpfile();
0 commit comments