Skip to content

Commit 7323e85

Browse files
committed
Rewrite MultipartStreamBuilder::addResource with addData
* Rewrite with new addData method. * Remove internal 'filename' key from MultipartStreamBuilder::data.
1 parent e451466 commit 7323e85

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/MultipartStreamBuilder.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class MultipartStreamBuilder
3434
private $boundary;
3535

3636
/**
37-
* @var array Element where each Element is an array with keys ['contents', 'headers', 'filename']
37+
* @var array Element where each Element is an array with keys ['contents', 'headers']
3838
*/
3939
private $data = [];
4040

@@ -121,8 +121,7 @@ public function addResource($name, $resource, array $options = [])
121121
}
122122

123123
$this->prepareHeaders($name, $stream, $options['filename'], $options['headers']);
124-
$this->data[] = ['contents' => $stream, 'headers' => $options['headers'], 'filename' => $options['filename']];
125-
124+
$this->addData($stream, $options['headers']);
126125
return $this;
127126
}
128127

0 commit comments

Comments
 (0)