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::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 1 Features 0
Metric Value
c 3
b 1
f 0
dl 0
loc 4
rs 10
cc 1
eloc 1
nc 1
nop 0
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