1 | <?php |
||
34 | class FileStream extends BaseObject implements StreamInterface |
||
35 | { |
||
36 | /** |
||
37 | * @var string file or stream name. |
||
38 | * Path alias can be used here, for example: '@app/runtime/items.csv'. |
||
39 | * This field can also be PHP stream name, e.g. anything which can be passed to `fopen()`, for example: 'php://input'. |
||
40 | */ |
||
41 | public $filename; |
||
42 | /** |
||
43 | * @var string file open mode. |
||
44 | */ |
||
45 | public $mode = 'r'; |
||
46 | |||
47 | /** |
||
48 | * @var resource|null stream resource |
||
49 | */ |
||
50 | private $_resource; |
||
51 | /** |
||
52 | * @var array a resource metadata. |
||
53 | */ |
||
54 | private $_metadata; |
||
55 | |||
56 | |||
57 | /** |
||
58 | * Destructor. |
||
59 | * Closes the stream resource when destroyed. |
||
60 | */ |
||
61 | public function __destruct() |
||
65 | |||
66 | /** |
||
67 | * @return resource a file pointer resource. |
||
68 | * @throws InvalidConfigException if unable to open a resource. |
||
69 | */ |
||
70 | public function getResource() |
||
81 | |||
82 | /** |
||
83 | * {@inheritdoc} |
||
84 | */ |
||
85 | public function __toString() |
||
97 | |||
98 | /** |
||
99 | * {@inheritdoc} |
||
100 | */ |
||
101 | public function close() |
||
109 | |||
110 | /** |
||
111 | * {@inheritdoc} |
||
112 | */ |
||
113 | public function detach() |
||
123 | |||
124 | /** |
||
125 | * {@inheritdoc} |
||
126 | */ |
||
127 | public function getSize() |
||
141 | |||
142 | /** |
||
143 | * {@inheritdoc} |
||
144 | */ |
||
145 | public function tell() |
||
153 | |||
154 | /** |
||
155 | * {@inheritdoc} |
||
156 | */ |
||
157 | public function eof() |
||
161 | |||
162 | /** |
||
163 | * {@inheritdoc} |
||
164 | */ |
||
165 | public function isSeekable() |
||
169 | |||
170 | /** |
||
171 | * {@inheritdoc} |
||
172 | */ |
||
173 | public function seek($offset, $whence = SEEK_SET) |
||
179 | |||
180 | /** |
||
181 | * {@inheritdoc} |
||
182 | */ |
||
183 | public function rewind() |
||
187 | |||
188 | /** |
||
189 | * {@inheritdoc} |
||
190 | */ |
||
191 | public function isWritable() |
||
201 | |||
202 | /** |
||
203 | * {@inheritdoc} |
||
204 | */ |
||
205 | public function write($string) |
||
213 | |||
214 | /** |
||
215 | * {@inheritdoc} |
||
216 | */ |
||
217 | public function isReadable() |
||
227 | |||
228 | /** |
||
229 | * {@inheritdoc} |
||
230 | */ |
||
231 | public function read($length) |
||
239 | |||
240 | /** |
||
241 | * {@inheritdoc} |
||
242 | */ |
||
243 | public function getContents() |
||
251 | |||
252 | /** |
||
253 | * {@inheritdoc} |
||
254 | */ |
||
255 | public function getMetadata($key = null) |
||
267 | } |
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..