Completed
Push — master ( e15c58...b150a8 )
by Changwan
07:08
created

MigratorServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 23
ccs 0
cts 13
cp 0
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 10 1
A boot() 0 3 1
1
<?php
2
namespace Wandu\Database\Migrator;
3
4
use Wandu\DI\ContainerInterface;
5
use Wandu\DI\ServiceProviderInterface;
6
use function Wandu\Foundation\config;
7
use function Wandu\Foundation\path;
8
9
class MigratorServiceProvider implements ServiceProviderInterface
10
{
11
    /**
12
     * {@inheritdoc}
13
     */
14
    public function register(ContainerInterface $app)
15
    {
16
        $app->closure(Configuration::class, function () {
17
            return new Configuration([
18
                'connection' => config('database.migrator.connection'),
19
                'table' => config('database.migrator.table'),
20
                'path' => path(config('database.migrator.path')),
21
            ]);
22
        });
23
    }
24
25
    /**
26
     * {@inheritdoc}
27
     */
28
    public function boot(ContainerInterface $app)
29
    {
30
    }
31
}
32