mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-17 12:23:46 +09:00
Update dependencies
This commit is contained in:
27
vendor/symfony/process/InputStream.php
vendored
27
vendor/symfony/process/InputStream.php
vendored
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user