Skip to content

Commit 156ea0f

Browse files
committed
Fix readStream return type
1 parent 0713160 commit 156ea0f

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/Adapter.php

+3-8
Original file line numberDiff line numberDiff line change
@@ -219,14 +219,11 @@ private function writeChunk(Guzzle $guzzle, string $upload_url, int $file_size,
219219

220220
public function read(string $path): string
221221
{
222-
if (!($object = $this->readStream($path))) {
222+
if (!($stream = $this->readStream($path))) {
223223
throw new UnableToReadFile('Unable to read file at ' . $path);
224224
}
225225

226-
$object['contents'] = stream_get_contents($object['stream']);
227-
unset($object['stream']);
228-
229-
return $object['contents'];
226+
return stream_get_contents($stream);
230227
}
231228

232229
public function readStream(string $path)
@@ -246,9 +243,7 @@ public function readStream(string $path)
246243
$download_url,
247244
);
248245

249-
$stream = StreamWrapper::getResource($response->getBody());
250-
251-
return compact('stream');
246+
return StreamWrapper::getResource($response->getBody());
252247
}
253248

254249
public function delete(string $path): void

0 commit comments

Comments
 (0)