ServiceProvider   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 2
dl 0
loc 28
ccs 9
cts 9
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 6 2
A register() 0 4 1
A registerMigrations() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of ibrand/address.
5
 *
6
 * (c) iBrand <https://www.ibrand.cc>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace iBrand\Component\Address;
13
14
/**
15
 * Class ServiceProvider.
16
 */
17
class ServiceProvider extends \Illuminate\Support\ServiceProvider
18
{
19
    /**
20
     *  Boot the service provider.
21
     */
22 3
    public function boot()
23
    {
24 3
        if ($this->app->runningInConsole()) {
25 3
            $this->registerMigrations();
26
        }
27 3
    }
28
29
    /**
30
     * Register the service provider.
31
     */
32 3
    public function register()
33
    {
34 3
        $this->app->bind(RepositoryContract::class, Repository::class);
35 3
    }
36
37
    /**
38
     * Register migration files.
39
     */
40 3
    protected function registerMigrations()
41
    {
42 3
        return $this->loadMigrationsFrom(__DIR__.'/../migrations');
43
    }
44
}
45