1 | <?php |
||
8 | final class ConcatenatedStream implements StreamInterface |
||
9 | { |
||
10 | /** |
||
11 | * @var array|StreamInterface[] |
||
12 | */ |
||
13 | private $streams = []; |
||
14 | |||
15 | /** |
||
16 | * @var int |
||
17 | */ |
||
18 | private $position = 0; |
||
19 | |||
20 | /** |
||
21 | * @var int |
||
22 | */ |
||
23 | private $index = 0; |
||
24 | |||
25 | /** |
||
26 | * @param iterable<StreamInterface> $streams |
||
|
|||
27 | */ |
||
28 | 120 | public function __construct(iterable $streams) |
|
34 | |||
35 | /** |
||
36 | * @param StreamInterface $stream |
||
37 | */ |
||
38 | 120 | private function addStream(StreamInterface $stream): void |
|
42 | |||
43 | /** |
||
44 | * @return string |
||
45 | */ |
||
46 | 92 | public function __toString(): string |
|
56 | |||
57 | public function close(): void |
||
63 | |||
64 | /** |
||
65 | * @return mixed |
||
66 | */ |
||
67 | public function detach() |
||
71 | |||
72 | /** |
||
73 | * @return int|null |
||
74 | */ |
||
75 | 1 | public function getSize(): ?int |
|
90 | |||
91 | /** |
||
92 | * @return int |
||
93 | * @throws \RuntimeException |
||
94 | */ |
||
95 | 1 | public function tell(): int |
|
99 | |||
100 | /** |
||
101 | * @return bool |
||
102 | */ |
||
103 | 22 | public function eof(): bool |
|
115 | |||
116 | /** |
||
117 | * @return bool |
||
118 | */ |
||
119 | public function isSeekable(): bool |
||
129 | |||
130 | /** |
||
131 | * @param int $offset |
||
132 | * @param int $whence |
||
133 | * @return int |
||
134 | */ |
||
135 | 1 | public function seek(int $offset, int $whence = SEEK_SET): int |
|
158 | |||
159 | /** |
||
160 | * @return bool |
||
161 | */ |
||
162 | 22 | public function rewind(): bool |
|
173 | |||
174 | /** |
||
175 | * @return bool |
||
176 | */ |
||
177 | 1 | public function isWritable(): bool |
|
181 | |||
182 | /** |
||
183 | * @param string $string |
||
184 | * @return int |
||
185 | */ |
||
186 | 1 | public function write($string): int |
|
190 | |||
191 | /** |
||
192 | * @return bool |
||
193 | */ |
||
194 | public function isReadable(): bool |
||
198 | |||
199 | /** |
||
200 | * @param int $length |
||
201 | * @return string |
||
202 | */ |
||
203 | 24 | public function read(int $length): string |
|
216 | |||
217 | /** |
||
218 | * @return string |
||
219 | */ |
||
220 | 3 | public function getContents(): string |
|
231 | |||
232 | /** |
||
233 | * @param array<int, string> $keys |
||
234 | * @return array<string, mixed> |
||
235 | */ |
||
236 | public function getMetadata(array $keys = []): array |
||
240 | } |
||
241 |
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.