1 | <?php |
||
8 | final class ResourceStream implements StreamInterface |
||
9 | { |
||
10 | /** |
||
11 | * @var resource |
||
12 | */ |
||
13 | private $resource; |
||
14 | |||
15 | /** |
||
16 | * @param resource $resource |
||
17 | */ |
||
18 | 83 | public function __construct($resource) |
|
27 | |||
28 | /** |
||
29 | * @return string |
||
30 | */ |
||
31 | 32 | public function __toString(): string |
|
36 | |||
37 | public function close(): void |
||
41 | |||
42 | /** |
||
43 | * @return mixed |
||
44 | */ |
||
45 | 77 | public function detach() |
|
49 | |||
50 | /** |
||
51 | * @return int|null |
||
52 | */ |
||
53 | 7 | public function getSize(): ?int |
|
62 | |||
63 | /** |
||
64 | * @return int |
||
65 | * @throws \RuntimeException |
||
66 | */ |
||
67 | 3 | public function tell(): int |
|
76 | |||
77 | /** |
||
78 | * @return bool |
||
79 | */ |
||
80 | 7 | public function eof(): bool |
|
84 | |||
85 | /** |
||
86 | * @return bool |
||
87 | */ |
||
88 | public function isSeekable(): bool |
||
97 | |||
98 | /** |
||
99 | * @param int $offset |
||
100 | * @param int $whence |
||
101 | * @return int |
||
102 | */ |
||
103 | 1 | public function seek(int $offset, int $whence = SEEK_SET): int |
|
107 | |||
108 | /** |
||
109 | * @return bool |
||
110 | */ |
||
111 | 33 | public function rewind(): bool |
|
115 | |||
116 | /** |
||
117 | * @return bool |
||
118 | */ |
||
119 | 1 | public function isWritable(): bool |
|
128 | |||
129 | /** |
||
130 | * @param string $string |
||
131 | * @return int |
||
132 | */ |
||
133 | 1 | public function write($string): int |
|
142 | |||
143 | /** |
||
144 | * @return bool |
||
145 | */ |
||
146 | public function isReadable(): bool |
||
150 | |||
151 | /** |
||
152 | * @param int $length |
||
153 | * @return string |
||
154 | */ |
||
155 | 11 | public function read(int $length): string |
|
164 | |||
165 | /** |
||
166 | * @return string |
||
167 | */ |
||
168 | 8 | public function getContents(): string |
|
177 | |||
178 | /** |
||
179 | * @param array<int, string> $keys |
||
180 | * @return array<string, mixed> |
||
|
|||
181 | */ |
||
182 | 32 | public function getMetadata(array $keys = []): array |
|
196 | } |
||
197 |
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.