Completed
Push — master ( ddf75c...48ce3d )
by Ian
03:15
created

SupportServiceProvider::boot()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 1
nc 1
nop 0
1
<?php
2
3
namespace IanOlson\Support;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class SupportServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Bootstrap the application services.
11
     */
12
    public function boot()
13
    {
14
        //
15
    }
16
17
    /**
18
     * Register the application services.
19
     */
20
    public function register()
21
    {
22
        $this->registerCrudGeneratorCommand();
23
        $this->registerGitlabGeneratorCommand();
24
    }
25
26
    /**
27
     * Get the services provided by the provider.
28
     *
29
     * @return array
30
     */
31
    public function provides()
32
    {
33
        return [];
34
    }
35
36
    /**
37
     * Register CRUD generator command.
38
     */
39
    private function registerCrudGeneratorCommand()
40
    {
41
        $this->app['support:make:crud'] = $this->app->share(function () {
42
            return new Commands\CrudGenerate();
43
        });
44
45
        $this->commands('support:make:crud');
46
    }
47
48
    /**
49
     * Register GitLab generator command.
50
     */
51
    private function registerGitlabGeneratorCommand()
52
    {
53
        $this->app['support:make:gitlab'] = $this->app->share(function () {
54
            return new Commands\GitlabGenerate();
55
        });
56
57
        $this->commands('support:make:gitlab');
58
    }
59
}
60