update call to array_get helper to use the Illuminate\Support\Arr class (#13)
Co-authored-by: Jan Wehner <jan.wehner@securepoint.de>
This commit is contained in:
parent
c1cd48549f
commit
39442da599
1 changed files with 2 additions and 1 deletions
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
namespace Superbalist\LaravelPrometheusExporter;
|
namespace Superbalist\LaravelPrometheusExporter;
|
||||||
|
|
||||||
|
use Illuminate\Support\Arr;
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
use Prometheus\CollectorRegistry;
|
use Prometheus\CollectorRegistry;
|
||||||
use Prometheus\Storage\Adapter;
|
use Prometheus\Storage\Adapter;
|
||||||
|
@ -50,7 +51,7 @@ class PrometheusServiceProvider extends ServiceProvider
|
||||||
$factory = $app['prometheus.storage_adapter_factory']; /** @var StorageAdapterFactory $factory */
|
$factory = $app['prometheus.storage_adapter_factory']; /** @var StorageAdapterFactory $factory */
|
||||||
$driver = config('prometheus.storage_adapter');
|
$driver = config('prometheus.storage_adapter');
|
||||||
$configs = config('prometheus.storage_adapters');
|
$configs = config('prometheus.storage_adapters');
|
||||||
$config = array_get($configs, $driver, []);
|
$config = Arr::get($configs, $driver, []);
|
||||||
return $factory->make($driver, $config);
|
return $factory->make($driver, $config);
|
||||||
});
|
});
|
||||||
$this->app->alias(Adapter::class, 'prometheus.storage_adapter');
|
$this->app->alias(Adapter::class, 'prometheus.storage_adapter');
|
||||||
|
|
Loading…
Reference in a new issue