src/Viserio/Component/Http/Stream/PumpStream.php
private function pump($length): void
    {
        if ($this->source) {
            do {
                $data = \call_user_func($this->source, $length);

                if ($data === false || $data === null) {
                    $this->source = null;

                    return;
                }

                $this->buffer->write($data);

                $length -= \strlen($data);
            } while ($length > 0);
        }
    }
private function pump($length): void
    {
        if ($this->source) {
            do {
                $data = \call_user_func($this->source, $length);

                if ($data === false || $data === null) {
                    $this->source = null;

                    return;
                }

                $this->buffer->write($data);

                $length -= \strlen($data);
            } while ($length > 0);
        }
    }
@param int $length

@return null|void