Aggiornato Composer

This commit is contained in:
Paolo A
2024-05-17 12:24:19 +00:00
parent 4ac62108b5
commit ec201d75b2
2238 changed files with 38684 additions and 59785 deletions

View File

@@ -18,7 +18,7 @@ use Psr\Http\Message\StreamInterface;
*/
final class PumpStream implements StreamInterface
{
/** @var callable|null */
/** @var callable(int): (string|false|null)|null */
private $source;
/** @var int|null */
@@ -34,7 +34,7 @@ final class PumpStream implements StreamInterface
private $buffer;
/**
* @param callable(int): (string|null|false) $source Source of the stream data. The callable MAY
* @param callable(int): (string|false|null) $source Source of the stream data. The callable MAY
* accept an integer argument used to control the
* amount of data to return. The callable MUST
* return a string when called, or false|null on error
@@ -60,6 +60,7 @@ final class PumpStream implements StreamInterface
throw $e;
}
trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR);
return '';
}
}
@@ -149,8 +150,6 @@ final class PumpStream implements StreamInterface
}
/**
* {@inheritdoc}
*
* @return mixed
*/
public function getMetadata($key = null)
@@ -164,11 +163,12 @@ final class PumpStream implements StreamInterface
private function pump(int $length): void
{
if ($this->source) {
if ($this->source !== null) {
do {
$data = call_user_func($this->source, $length);
$data = ($this->source)($length);
if ($data === false || $data === null) {
$this->source = null;
return;
}
$this->buffer->write($data);