Completed
Push — master ( 603a9f...7527cc )
by Changwan
05:44
created

MigratorServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 0%

Importance

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

2 Methods

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