Skip to content

Commit

Permalink
Update Parallel.php
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTechsTech committed Dec 20, 2021
1 parent 911c973 commit a445e55
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Spawn/Parallel.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use Async\Spawn\ParallelStatus;
use Async\Spawn\ParallelInterface;
use Async\Spawn\FutureInterface;
use ReturnTypeWillChange;

/**
* The `Parallel` class provides an **pool** of `Future's`. It takes care of handling as many child processes as you want
Expand Down Expand Up @@ -377,7 +378,7 @@ public function offsetExists($offset): bool
return isset($this->parallel[$offset]);
}

public function offsetGet($offset)
public function offsetGet($offset): ?FutureInterface
{
return isset($this->parallel[$offset]) ? $this->parallel[$offset] : null;
}
Expand Down

0 comments on commit a445e55

Please sign in to comment.