AppServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 5

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 4 1
A register() 0 10 1
A provides() 0 4 1
1
<?php
2
/**
3
 * GitScrum v0.1.
4
 *
5
 * @author  Renato Marinho <[email protected]>
6
 * @license http://opensource.org/licenses/GPL-3.0 GPLv3
7
 */
8
9
namespace GitScrum\Providers;
10
11
use Illuminate\Support\ServiceProvider;
12
use Illuminate\Database\Eloquent\Relations\Relation;
13
use GitScrum\Classes\Github;
14
use GitScrum\Classes\Gitlab;
15
16
class AppServiceProvider extends ServiceProvider
17
{
18
    /**
19
     * Bootstrap any application services.
20
     */
21
    public function boot()
22
    {
23
        Relation::morphMap(\Config::get('database.relation'));
24
    }
25
26
    /**
27
     * Register any application services.
28
     */
29
    public function register()
30
    {
31
        $this->app->bind('Github', function () {
32
            return new Github();
33
        });
34
35
        $this->app->bind('Gitlab', function () {
36
            return new Gitlab();
37
        });
38
    }
39
40
    public function provides()
41
    {
42
        return ['Github', 'Gitlab'];
43
    }
44
}
45