| Conditions | 1 |
| Paths | 1 |
| Total Lines | 16 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 1.0007 |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | 1 | public function __invoke(array $options) |
|
| 13 | { |
||
| 14 | 1 | $accountName = $options['accountName'] ?? null; |
|
| 15 | 1 | $apiKey = $options['apiKey'] ?? null; |
|
| 16 | 1 | $container = $options['container'] ?? null; |
|
| 17 | 1 | $prefix = $options['prefix'] ?? null; |
|
| 18 | |||
| 19 | 1 | $endpoint = sprintf( |
|
| 20 | 1 | 'DefaultEndpointsProtocol=https;AccountName=%s;AccountKey=%s', |
|
| 21 | $accountName, |
||
| 22 | 1 | $apiKey |
|
| 23 | ); |
||
| 24 | |||
| 25 | 1 | $proxy = ServicesBuilder::getInstance()->createBlobService($endpoint); |
|
| 26 | 1 | return new AzureAdapter($proxy, $container, $prefix); |
|
| 27 | } |
||
| 28 | } |
||
| 29 |