Skip to content

Commit

Permalink
Merge branch 'master' of github.com:mzur/laravel-openstack-swift
Browse files Browse the repository at this point in the history
  • Loading branch information
mzur committed Nov 25, 2019
2 parents 8091337 + f4c77b5 commit 2ecc7ae
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/SwiftServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Mzur\Filesystem;

use Illuminate\Support\Arr;
use League\Flysystem\Config;
use League\Flysystem\Filesystem;
use Biigle\CachedOpenStack\OpenStack;
Expand All @@ -22,8 +23,8 @@ public function boot()
->objectStoreV1()
->getContainer($config['container']);

$prefix = array_get($config, 'prefix', null);
$url = array_get($config, 'url', null);
$prefix = Arr::get($config, 'prefix', null);
$url = Arr::get($config, 'url', null);
$adapter = new SwiftAdapter($container, $prefix, $url);

return new Filesystem($adapter, $this->getFlyConfig($config));
Expand Down Expand Up @@ -57,10 +58,10 @@ protected function getOsOptions($config)
'password' => $config['password'],
'domain' => ['name' => $config['domain']],
],
'debugLog' => array_get($config, 'debugLog', false),
'logger' => array_get($config, 'logger', null),
'messageFormatter' => array_get($config, 'messageFormatter', null),
'requestOptions' => array_get($config, 'requestOptions', []),
'debugLog' => Arr::get($config, 'debugLog', false),
'logger' => Arr::get($config, 'logger', null),
'messageFormatter' => Arr::get($config, 'messageFormatter', null),
'requestOptions' => Arr::get($config, 'requestOptions', []),
];

if (array_key_exists('projectId', $config)) {
Expand All @@ -80,7 +81,7 @@ protected function getOsOptions($config)
protected function getFlyConfig($config)
{
$flyConfig = new Config([
'disable_asserts' => array_get($config, 'disableAsserts', false),
'disable_asserts' => Arr::get($config, 'disableAsserts', false),
]);

$passThroughConfig = [
Expand Down

0 comments on commit 2ecc7ae

Please sign in to comment.