GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

MigrationServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

Changes 4
Bugs 1 Features 0
Metric Value
wmc 2
c 4
b 1
f 0
lcom 1
cbo 4
dl 0
loc 37
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 4 1
A register() 0 18 1
1
<?php
2
3
namespace Caffeinated\Modules\Providers;
4
5
use Illuminate\Database\Migrations\Migrator;
6
use Illuminate\Database\Migrations\DatabaseMigrationRepository;
7
use Illuminate\Support\ServiceProvider;
8
9
class MigrationServiceProvider extends ServiceProvider
10
{
11
    /**
12
     * @var bool Indicates if loading of the provider is deferred.
13
     */
14
    protected $defer = false;
15
16
    /**
17
     * Boot the service provider.
18
     */
19
    public function boot()
20
    {
21
        //
22
    }
23
24
    /**
25
     * Register the service provider.
26
     */
27
    public function register()
28
    {
29
        // Register the migration repository service.
30
        $this->app->singleton('migration.repository', function ($app) {
31
            $table = $app['config']['database.migrations'];
32
33
            return new DatabaseMigrationRepository($app['db'], $table);
34
        });
35
36
        // The migrator is responsible for actually running and rollback the migration
37
        // files in the application. We'll pass in our database connection resolver
38
        // so the migrator can resolve any of these connections when it needs to.
39
        $this->app->singleton('migrator', function ($app) {
40
            $repository = $app['migration.repository'];
41
42
            return new Migrator($repository, $app['db'], $app['files']);
43
        });
44
    }
45
}
46