Skip to content

Commit

Permalink
Make nullable parameters explicity nullable for PHP 8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Dec 4, 2024
1 parent e71eb1a commit 5fef96e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class Process extends EventEmitter
* @param null|array $fds File descriptors to allocate for this process (or null = default STDIO streams)
* @throws \LogicException On windows or when proc_open() is not installed
*/
public function __construct($cmd, $cwd = null, array $env = null, array $fds = null)
public function __construct($cmd, $cwd = null, ?array $env = null, ?array $fds = null)
{
if (!\function_exists('proc_open')) {
throw new \LogicException('The Process class relies on proc_open(), which is not available on your PHP installation.');
Expand Down Expand Up @@ -164,7 +164,7 @@ public function __construct($cmd, $cwd = null, array $env = null, array $fds = n
* @param float $interval Interval to periodically monitor process state (seconds)
* @throws \RuntimeException If the process is already running or fails to start
*/
public function start(LoopInterface $loop = null, $interval = 0.1)
public function start(?LoopInterface $loop = null, $interval = 0.1)
{
if ($this->isRunning()) {
throw new \RuntimeException('Process is already running');
Expand Down

0 comments on commit 5fef96e

Please sign in to comment.