updated backend

This commit is contained in:
Torsten 2020-01-17 10:58:01 +01:00
parent 1fea0f4fe7
commit 11521c2339
3459 changed files with 72735 additions and 168535 deletions

View file

@ -20,9 +20,9 @@ use Symfony\Component\Process\Exception\RuntimeException;
*/
class InputStream implements \IteratorAggregate
{
/** @var null|callable */
/** @var callable|null */
private $onEmpty = null;
private $input = array();
private $input = [];
private $open = true;
/**
@ -36,8 +36,8 @@ class InputStream implements \IteratorAggregate
/**
* Appends an input to the write buffer.
*
* @param resource|string|int|float|bool|\Traversable|null The input to append as scalar,
* stream resource or \Traversable
* @param resource|string|int|float|bool|\Traversable|null $input The input to append as scalar,
* stream resource or \Traversable
*/
public function write($input)
{
@ -66,6 +66,9 @@ class InputStream implements \IteratorAggregate
return !$this->open;
}
/**
* @return \Traversable
*/
public function getIterator()
{
$this->open = true;
@ -78,9 +81,7 @@ class InputStream implements \IteratorAggregate
$current = array_shift($this->input);
if ($current instanceof \Iterator) {
foreach ($current as $cur) {
yield $cur;
}
yield from $current;
} else {
yield $current;
}