PersistenceServiceProvider::register()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 4
c 1
b 0
f 0
nc 2
nop 0
dl 0
loc 8
rs 10
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace App\Providers;
6
7
use Illuminate\Support\ServiceProvider;
8
9
final class PersistenceServiceProvider extends ServiceProvider
10
{
11
    public function register()
12
    {
13
        $driver = config('persistence.driver');
14
15
        $config = config("persistence.repository-gateways");
16
17
        foreach ($config as $gatewayInterface => $gatewayConcretions) {
18
            $this->app->singleton($gatewayInterface, $gatewayConcretions[$driver]);
19
        }
20
    }
21
}
22