Passed
Push — master ( e1711c...6da277 )
by Jonas
04:38
created

DatabaseServiceProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
dl 0
loc 11
ccs 3
cts 3
cp 1
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 4 1
1
<?php
2
3
namespace Staudenmeir\LaravelCte;
4
5
use Illuminate\Support\ServiceProvider;
6
use Staudenmeir\LaravelCte\Connectors\ConnectionFactory;
7
8
class DatabaseServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * Register the service provider.
12
     *
13
     * @return void
14
     */
15 68
    public function register()
16
    {
17 68
        $this->app->singleton('db.factory', function ($app) {
18 68
            return new ConnectionFactory($app);
19 68
        });
20 68
    }
21
}
22