| Conditions | 1 |
| Paths | 1 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | public function __invoke(array $options) |
||
| 13 | { |
||
| 14 | $options = array_merge([ |
||
| 15 | 'key' => null, |
||
| 16 | 'secret' => null, |
||
| 17 | 'region' => 'us-east-1', |
||
| 18 | 'version' => 'latest', |
||
| 19 | 'bucket' => null, |
||
| 20 | 'prefix' => null, |
||
| 21 | ], $options); |
||
| 22 | |||
| 23 | $bucket = $options['bucket']; |
||
| 24 | $prefix = $options['prefix']; |
||
| 25 | |||
| 26 | $client = new S3Client($options); |
||
| 27 | |||
| 28 | return new AwsS3Adapter($client, $bucket, $prefix); |
||
| 29 | } |
||
| 30 | } |
||
| 31 |