1 | <?php |
||
35 | class ResourceStream extends BaseObject implements StreamInterface |
||
36 | { |
||
37 | /** |
||
38 | * @var resource stream resource. |
||
39 | */ |
||
40 | public $resource; |
||
41 | |||
42 | /** |
||
43 | * @var array a resource metadata. |
||
44 | */ |
||
45 | private $_metadata; |
||
46 | |||
47 | |||
48 | /** |
||
49 | * Destructor. |
||
50 | * Closes the stream resource when destroyed. |
||
51 | */ |
||
52 | 47 | public function __destruct() |
|
56 | |||
57 | /** |
||
58 | * {@inheritdoc} |
||
59 | */ |
||
60 | 1 | public function __toString() |
|
72 | |||
73 | /** |
||
74 | * {@inheritdoc} |
||
75 | */ |
||
76 | 47 | public function close() |
|
83 | |||
84 | /** |
||
85 | * {@inheritdoc} |
||
86 | */ |
||
87 | public function detach() |
||
97 | |||
98 | /** |
||
99 | * {@inheritdoc} |
||
100 | */ |
||
101 | 1 | public function getSize() |
|
115 | |||
116 | /** |
||
117 | * {@inheritdoc} |
||
118 | */ |
||
119 | public function tell() |
||
120 | { |
||
121 | $result = ftell($this->resource); |
||
122 | if ($result === false) { |
||
123 | throw new \RuntimeException('Unable to determine stream position'); |
||
124 | } |
||
125 | return $result; |
||
126 | } |
||
127 | |||
128 | /** |
||
129 | * {@inheritdoc} |
||
130 | */ |
||
131 | 1 | public function eof() |
|
135 | |||
136 | /** |
||
137 | * {@inheritdoc} |
||
138 | */ |
||
139 | 1 | public function isSeekable() |
|
143 | |||
144 | /** |
||
145 | * {@inheritdoc} |
||
146 | */ |
||
147 | 3 | public function seek($offset, $whence = SEEK_SET) |
|
153 | |||
154 | /** |
||
155 | * {@inheritdoc} |
||
156 | */ |
||
157 | public function rewind() |
||
161 | |||
162 | /** |
||
163 | * {@inheritdoc} |
||
164 | */ |
||
165 | 22 | public function isWritable() |
|
175 | |||
176 | /** |
||
177 | * {@inheritdoc} |
||
178 | */ |
||
179 | 1 | public function write($string) |
|
187 | |||
188 | /** |
||
189 | * {@inheritdoc} |
||
190 | */ |
||
191 | 21 | public function isReadable() |
|
201 | |||
202 | /** |
||
203 | * {@inheritdoc} |
||
204 | */ |
||
205 | 2 | public function read($length) |
|
213 | |||
214 | /** |
||
215 | * {@inheritdoc} |
||
216 | */ |
||
217 | 2 | public function getContents() |
|
225 | |||
226 | /** |
||
227 | * {@inheritdoc} |
||
228 | */ |
||
229 | 4 | public function getMetadata($key = null) |
|
241 | } |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..