Skip to content

Commit

Permalink
Removed default values from AWS/Azure streams
Browse files Browse the repository at this point in the history
  • Loading branch information
norberttech committed May 9, 2024
1 parent 03fdfc6 commit a6a9f08
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,10 @@ protected function filesystem() : Filesystem
*/
$contextOptions = \stream_context_get_options($this->context);

/**
* @var array{credentials: array{key: string, secret: string}, region: string, version: string} $clientOptions
*/
$clientOptions = \array_merge(
[
'region' => 'us-east-1',
'version' => 'latest',
],
$contextOptions[self::PROTOCOL]['client'] ?? []
);
$clientOptions = $contextOptions[self::PROTOCOL]['client'];

/** @var string $bucket */
$bucket = $contextOptions[self::PROTOCOL]['bucket'] ?? '';
$bucket = $contextOptions[self::PROTOCOL]['bucket'];

/**
* @psalm-suppress PossiblyNullArrayAccess
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,10 @@ protected function filesystem() : Filesystem
/**
* @var array{connection-string: string} $clientOptions
*/
$clientOptions = \array_merge(
['connection-string' => ''],
/** @phpstan-ignore-next-line */
['connection-string' => $contextOptions[self::PROTOCOL]['connection-string']] ?? []
);
$clientOptions = ['connection-string' => $contextOptions[self::PROTOCOL]['connection-string']];

/** @var string $container */
$container = $contextOptions[self::PROTOCOL]['container'] ?? '';
$container = $contextOptions[self::PROTOCOL]['container'];

/**
* @psalm-suppress PossiblyNullArrayAccess
Expand Down

0 comments on commit a6a9f08

Please sign in to comment.