DbRouterServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 5
dl 0
loc 26
ccs 6
cts 6
cp 1
rs 10
c 2
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 3 1
A boot() 0 6 1
1
<?php
2
3
namespace Oddvalue\DbRouter;
4
5
use Illuminate\Routing\Router;
6
use Illuminate\Support\ServiceProvider;
7
8
class DbRouterServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * Indicates if loading of the provider is deferred.
12
     *
13
     * @var bool
14
     */
15
    protected $defer = true;
16
17
    /**
18
     * Bootstrap the application services.
19
     */
20 36
    public function boot()
21
    {
22
        // publish the migrations and seeds
23 36
        $this->publishes([__DIR__.'/../database/migrations/' => database_path('migrations')], 'migrations');
24
25 36
        $this->loadRoutesFrom(__DIR__.'/../routes/web.php');
26 36
    }
27
28
    /**
29
     * Register the application services.
30
     */
31 36
    public function register()
32
    {
33 36
        $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'dbrouter');
34 36
    }
35
}
36