PersistenceServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 10
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 8 2
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