Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | public function handle(UploadCommand $command) |
||
23 | { |
||
24 | $source = $this->sourceToStream($command->getSource()); |
||
25 | $options = array_filter($command->getOptions()); |
||
26 | |||
27 | $promise = $this->s3Client->uploadAsync( |
||
28 | $command->getBucket(), |
||
29 | $command->getFilename(), |
||
30 | $source, |
||
31 | $command->getAcl(), |
||
32 | $options |
||
33 | ); |
||
34 | |||
35 | return $command->isAsync() ? $promise : $promise->wait(); |
||
36 | } |
||
54 |