Skip to content
This repository has been archived by the owner on Mar 24, 2024. It is now read-only.

Commit

Permalink
Fixed some type issues
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewbdaly committed Nov 15, 2020
1 parent 20f109a commit 701a428
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
8 changes: 5 additions & 3 deletions src/AzureBlobStorageAdapter.php
Expand Up @@ -4,8 +4,8 @@

use Illuminate\Support\Arr;
use League\Flysystem\AzureBlobStorage\AzureBlobStorageAdapter as BaseAzureBlobStorageAdapter;
use MicrosoftAzure\Storage\Blob\BlobRestProxy;
use Matthewbdaly\LaravelAzureStorage\Exceptions\InvalidCustomUrl;
use MicrosoftAzure\Storage\Blob\BlobRestProxy;
use MicrosoftAzure\Storage\Blob\BlobSharedAccessSignatureHelper;
use MicrosoftAzure\Storage\Common\Internal\Resources;

Expand Down Expand Up @@ -33,14 +33,14 @@ final class AzureBlobStorageAdapter extends BaseAzureBlobStorageAdapter
/**
* Custom url for getUrl()
*
* @var string
* @var string|null
*/
private $url;

/**
* The account key to access the storage
*
* @var string
* @var string|null
*/
private $key;

Expand Down Expand Up @@ -71,6 +71,7 @@ public function __construct(BlobRestProxy $client, string $container, string $ke
* Get the file URL by given path.
*
* @param string $path Path.
*
* @return string
*/
public function getUrl(string $path)
Expand All @@ -87,6 +88,7 @@ public function getUrl(string $path)
* @param string $path
* @param \Datetime|string $ttl
* @param array $options
*
* @return string
*/
public function getTemporaryUrl(string $path, $ttl, array $options = [])
Expand Down
9 changes: 6 additions & 3 deletions src/AzureStorageServiceProvider.php
Expand Up @@ -7,9 +7,10 @@
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\ServiceProvider;
use League\Flysystem\Filesystem;
use League\Flysystem\Cached\CacheInterface;
use League\Flysystem\Cached\CachedAdapter;
use League\Flysystem\Cached\Storage\Memory as MemoryStore;
use League\Flysystem\Filesystem;
use Matthewbdaly\LaravelAzureStorage\Exceptions\CacheAdapterNotInstalled;
use MicrosoftAzure\Storage\Blob\BlobRestProxy;
use MicrosoftAzure\Storage\Common\Middlewares\RetryMiddleware;
Expand Down Expand Up @@ -94,11 +95,12 @@ public function register()
* Create a cache store instance.
*
* @param mixed $config
*
* @return \League\Flysystem\Cached\CacheInterface
*
* @throws \InvalidArgumentException
*/
protected function createCacheStore($config)
protected function createCacheStore($config): CacheInterface
{
if ($config === true) {
return new MemoryStore();
Expand All @@ -115,9 +117,10 @@ protected function createCacheStore($config)
* Create retry middleware instance.
*
* @param array $config
*
* @return RetryMiddleware
*/
protected function createRetryMiddleware($config)
protected function createRetryMiddleware(array $config): RetryMiddleware
{
return RetryMiddlewareFactory::create(
RetryMiddlewareFactory::GENERAL_RETRY_TYPE,
Expand Down

0 comments on commit 701a428

Please sign in to comment.