AppServiceProvider::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

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