Update dependencies

This commit is contained in:
Chris Hunt
2024-02-16 21:36:54 +00:00
parent 22d7a59e59
commit d52ae0d3c3
9569 changed files with 460443 additions and 282416 deletions

View File

@@ -22,17 +22,18 @@ use Symfony\Component\Process\Exception\RuntimeException;
*/
class InputStream implements \IteratorAggregate
{
/** @var callable|null */
private $onEmpty = null;
private $input = [];
private $open = true;
private ?\Closure $onEmpty = null;
private array $input = [];
private bool $open = true;
/**
* Sets a callback that is called when the write buffer becomes empty.
*
* @return void
*/
public function onEmpty(callable $onEmpty = null)
public function onEmpty(?callable $onEmpty = null)
{
$this->onEmpty = $onEmpty;
$this->onEmpty = null !== $onEmpty ? $onEmpty(...) : null;
}
/**
@@ -40,8 +41,10 @@ class InputStream implements \IteratorAggregate
*
* @param resource|string|int|float|bool|\Traversable|null $input The input to append as scalar,
* stream resource or \Traversable
*
* @return void
*/
public function write($input)
public function write(mixed $input)
{
if (null === $input) {
return;
@@ -54,6 +57,8 @@ class InputStream implements \IteratorAggregate
/**
* Closes the write buffer.
*
* @return void
*/
public function close()
{
@@ -62,17 +67,15 @@ class InputStream implements \IteratorAggregate
/**
* Tells whether the write buffer is closed or not.
*
* @return bool
*/
public function isClosed()
{
return !$this->open;
}
/**
* @return \Traversable<int, string>
*/
#[\ReturnTypeWillChange]
public function getIterator()
public function getIterator(): \Traversable
{
$this->open = true;