diff --git a/src/ProcessBase.php b/src/ProcessBase.php index 2ad6186..c071ee8 100644 --- a/src/ProcessBase.php +++ b/src/ProcessBase.php @@ -125,7 +125,7 @@ public function setLogger($logger) /** * @inheritDoc */ - public function start(callable $callback = null, array $env = []): void + public function start(?callable $callback = null, array $env = []): void { $cmd = $this->getCommandLine(); if ($this->isSimulated()) { diff --git a/src/ProcessManager.php b/src/ProcessManager.php index acfe12b..8476731 100644 --- a/src/ProcessManager.php +++ b/src/ProcessManager.php @@ -103,7 +103,7 @@ public function siteProcess(SiteAliasInterface $siteAlias, $args = [], $options * @param int|float|null $timeout The timeout in seconds or null to disable * @return Process */ - public function process($command, $cwd = null, array $env = null, $input = null, $timeout = 60) + public function process($command, $cwd = null, ?array $env = null, $input = null, $timeout = 60) { return new ProcessBase($command, $cwd, $env, $input, $timeout); } @@ -117,7 +117,7 @@ public function process($command, $cwd = null, array $env = null, $input = null, * @param int|float|null $timeout The timeout in seconds or null to disable * @return Process */ - public function shell($command, $cwd = null, array $env = null, $input = null, $timeout = 60) + public function shell($command, $cwd = null, ?array $env = null, $input = null, $timeout = 60) { return ProcessBase::fromShellCommandline($command, $cwd, $env, $input, $timeout); } diff --git a/src/SiteProcess.php b/src/SiteProcess.php index c0aec48..8abf65b 100644 --- a/src/SiteProcess.php +++ b/src/SiteProcess.php @@ -198,13 +198,13 @@ public function getCommandLine(): string /** * @inheritDoc */ - public function start(callable $callback = null, array $env = []): void + public function start(?callable $callback = null, array $env = []): void { $cmd = $this->getCommandLine(); parent::start($callback, $env); } - public function mustRun(callable $callback = null, array $env = []): static + public function mustRun(?callable $callback = null, array $env = []): static { if (0 !== $this->run($callback, $env)) { // Be less verbose when there is nothing in stdout or stderr. @@ -220,7 +220,7 @@ public function mustRun(callable $callback = null, array $env = []): static /** * @inheritDoc */ - public function wait(callable $callback = null): int + public function wait(?callable $callback = null): int { $return = parent::wait($callback); return $return;