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

Commit 701a428

Browse files
committed
Fixed some type issues
1 parent 20f109a commit 701a428

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

src/AzureBlobStorageAdapter.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
use Illuminate\Support\Arr;
66
use League\Flysystem\AzureBlobStorage\AzureBlobStorageAdapter as BaseAzureBlobStorageAdapter;
7-
use MicrosoftAzure\Storage\Blob\BlobRestProxy;
87
use Matthewbdaly\LaravelAzureStorage\Exceptions\InvalidCustomUrl;
8+
use MicrosoftAzure\Storage\Blob\BlobRestProxy;
99
use MicrosoftAzure\Storage\Blob\BlobSharedAccessSignatureHelper;
1010
use MicrosoftAzure\Storage\Common\Internal\Resources;
1111

@@ -33,14 +33,14 @@ final class AzureBlobStorageAdapter extends BaseAzureBlobStorageAdapter
3333
/**
3434
* Custom url for getUrl()
3535
*
36-
* @var string
36+
* @var string|null
3737
*/
3838
private $url;
3939

4040
/**
4141
* The account key to access the storage
4242
*
43-
* @var string
43+
* @var string|null
4444
*/
4545
private $key;
4646

@@ -71,6 +71,7 @@ public function __construct(BlobRestProxy $client, string $container, string $ke
7171
* Get the file URL by given path.
7272
*
7373
* @param string $path Path.
74+
*
7475
* @return string
7576
*/
7677
public function getUrl(string $path)
@@ -87,6 +88,7 @@ public function getUrl(string $path)
8788
* @param string $path
8889
* @param \Datetime|string $ttl
8990
* @param array $options
91+
*
9092
* @return string
9193
*/
9294
public function getTemporaryUrl(string $path, $ttl, array $options = [])

src/AzureStorageServiceProvider.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77
use Illuminate\Support\Arr;
88
use Illuminate\Support\Facades\Storage;
99
use Illuminate\Support\ServiceProvider;
10-
use League\Flysystem\Filesystem;
10+
use League\Flysystem\Cached\CacheInterface;
1111
use League\Flysystem\Cached\CachedAdapter;
1212
use League\Flysystem\Cached\Storage\Memory as MemoryStore;
13+
use League\Flysystem\Filesystem;
1314
use Matthewbdaly\LaravelAzureStorage\Exceptions\CacheAdapterNotInstalled;
1415
use MicrosoftAzure\Storage\Blob\BlobRestProxy;
1516
use MicrosoftAzure\Storage\Common\Middlewares\RetryMiddleware;
@@ -94,11 +95,12 @@ public function register()
9495
* Create a cache store instance.
9596
*
9697
* @param mixed $config
98+
*
9799
* @return \League\Flysystem\Cached\CacheInterface
98100
*
99101
* @throws \InvalidArgumentException
100102
*/
101-
protected function createCacheStore($config)
103+
protected function createCacheStore($config): CacheInterface
102104
{
103105
if ($config === true) {
104106
return new MemoryStore();
@@ -115,9 +117,10 @@ protected function createCacheStore($config)
115117
* Create retry middleware instance.
116118
*
117119
* @param array $config
120+
*
118121
* @return RetryMiddleware
119122
*/
120-
protected function createRetryMiddleware($config)
123+
protected function createRetryMiddleware(array $config): RetryMiddleware
121124
{
122125
return RetryMiddlewareFactory::create(
123126
RetryMiddlewareFactory::GENERAL_RETRY_TYPE,

0 commit comments

Comments
 (0)