This repository was archived by the owner on Sep 20, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +2
-28
lines changed Expand file tree Collapse file tree 2 files changed +2
-28
lines changed Original file line number Diff line number Diff line change @@ -187,20 +187,7 @@ public function readLine ( ) {
187
187
*/
188
188
public function readAll ( ) {
189
189
190
- $ current = $ this ->tell ();
191
-
192
- $ this ->seek (0 , \Hoa \Stream \IStream \Pointable::SEEK_END );
193
- $ end = $ this ->tell ();
194
-
195
- if (0 === $ end )
196
- return '' ;
197
-
198
- $ this ->seek (0 , \Hoa \Stream \IStream \Pointable::SEEK_SET );
199
- $ handle = $ this ->read ($ end );
200
-
201
- $ this ->seek ($ current , \Hoa \Stream \IStream \Pointable::SEEK_SET );
202
-
203
- return $ handle ;
190
+ return stream_get_contents ($ this ->getStream ());
204
191
}
205
192
206
193
/**
Original file line number Diff line number Diff line change @@ -195,20 +195,7 @@ public function readLine ( ) {
195
195
*/
196
196
public function readAll ( ) {
197
197
198
- $ current = $ this ->tell ();
199
-
200
- $ this ->seek (0 , \Hoa \Stream \IStream \Pointable::SEEK_END );
201
- $ end = $ this ->tell ();
202
-
203
- if (0 === $ end )
204
- return '' ;
205
-
206
- $ this ->seek (0 , \Hoa \Stream \IStream \Pointable::SEEK_SET );
207
- $ handle = $ this ->read ($ end );
208
-
209
- $ this ->seek ($ current , \Hoa \Stream \IStream \Pointable::SEEK_SET );
210
-
211
- return $ handle ;
198
+ return stream_get_contents ($ this ->getStream ());
212
199
}
213
200
214
201
/**
You can’t perform that action at this time.
0 commit comments