(int $length)
| 107 | } |
| 108 | |
| 109 | public function read(int $length) |
| 110 | { |
| 111 | if ($this->closed) { |
| 112 | return ''; |
| 113 | } |
| 114 | |
| 115 | if ($length <= 0) { |
| 116 | while (!$this->done) { |
| 117 | $this->pump(1); |
| 118 | } |
| 119 | return $this->consumeAvailable(null); |
| 120 | } |
| 121 | |
| 122 | if ($this->availableBytes() <= 0 && !$this->done) { |
| 123 | $this->pump(1); |
| 124 | } |
| 125 | |
| 126 | return $this->consumeAvailable($length); |
| 127 | } |
| 128 | |
| 129 | public function close(): void |
| 130 | { |
nothing calls this directly
no test coverage detected