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.

RethinkdbServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 7

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 7
dl 0
loc 48
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 5 1
A register() 0 24 1
A provides() 0 4 1
1
<?php
2
3
namespace duxet\Rethinkdb;
4
5
use duxet\Rethinkdb\Console\Migrations\MigrateMakeCommand;
6
use duxet\Rethinkdb\Console\Model\ModelMakeCommand;
7
use duxet\Rethinkdb\Eloquent\Model;
8
use duxet\Rethinkdb\Migrations\MigrationCreator;
9
use Illuminate\Support\ServiceProvider;
10
11
class RethinkdbServiceProvider extends ServiceProvider
12
{
13
    /**
14
     * Bootstrap the application events.
15
     *
16
     * @return void
17
     */
18
    public function boot()
19
    {
20
        Model::setConnectionResolver($this->app['db']);
21
        Model::setEventDispatcher($this->app['events']);
22
    }
23
24
    /**
25
     * Register the service provider.
26
     *
27
     * @return void
28
     */
29
    public function register()
30
    {
31
        $this->app->resolving('db', function ($db) {
32
            $db->extend('rethinkdb', function ($config) {
33
                return new Connection($config);
34
            });
35
        });
36
37
        $this->app->singleton('command.rethink-migrate.make', function ($app) {
38
39
            $creator = new MigrationCreator($app['files']);
40
            $composer = $app['composer'];
41
42
            return new MigrateMakeCommand($creator, $composer);
43
        });
44
45
        $this->commands('command.rethink-migrate.make');
46
47
        $this->app->singleton('command.rethink-model.make', function ($app) {
48
            return new ModelMakeCommand($app['files']);
49
        });
50
51
        $this->commands('command.rethink-model.make');
52
    }
53
54
    public function provides()
55
    {
56
        return ['command.rethink-migrate.make', 'command.rethink-model.make'];
57
    }
58
}
59