MigrationServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 24
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 2 1
A register() 0 7 1
1
<?php
2
3
namespace TestMonitor\NestedMigrations;
4
5
use TestMonitor\NestedMigrations\Migrations\Migrator;
6
use Illuminate\Database\MigrationServiceProvider as IlluminateMigrationServiceProvider;
7
8
class MigrationServiceProvider extends IlluminateMigrationServiceProvider
9
{
10
    /**
11
     * Bootstrap any application services.
12
     *
13
     * @return void
14
     */
15
    public function boot()
16
    {
17
        //
18
    }
19
20
    /**
21
     * Register any application services.
22
     *
23
     * @return void
24
     */
25
    public function register()
26
    {
27
        // Override the default Laravel migrator.
28
        $this->app->singleton('migrator', function ($app) {
29
            $repository = $app['migration.repository'];
30
31
            return new Migrator($repository, $app['db'], $app['files'], $app['events']);
32
        });
33
    }
34
}
35