Skip to content
This repository was archived by the owner on Aug 8, 2024. It is now read-only.

Commit 6654880

Browse files
committed
Fixed a Psalm issue
1 parent 8de08c1 commit 6654880

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/AzureStorageServiceProvider.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Illuminate\Support\ServiceProvider;
99
use League\Flysystem\Filesystem;
1010
use Matthewbdaly\LaravelAzureStorage\Exceptions\EndpointNotSet;
11+
use Matthewbdaly\LaravelAzureStorage\Exceptions\KeyNotSet;
1112
use MicrosoftAzure\Storage\Blob\BlobRestProxy;
1213
use MicrosoftAzure\Storage\Common\Middlewares\RetryMiddleware;
1314
use MicrosoftAzure\Storage\Common\Middlewares\RetryMiddlewareFactory;
@@ -128,6 +129,9 @@ protected function createConnectionString(array $config): string
128129
$config['sasToken']
129130
);
130131
}
132+
if (!isset($config['key'])) {
133+
throw new KeyNotSet();
134+
}
131135
$endpoint = sprintf(
132136
'DefaultEndpointsProtocol=https;AccountName=%s;AccountKey=%s;',
133137
$config['name'],

0 commit comments

Comments
 (0)