Completed
Push — develop ( 64265e...12ceca )
by Mohamed
10:07
created

AppServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
lcom 1
cbo 4
dl 0
loc 33
c 2
b 0
f 0
ccs 11
cts 11
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 16 1
A boot() 0 3 1
1
<?php
2
3
/*
4
 * This file is part of the Tinyissue package.
5
 *
6
 * (c) Mohamed Alsharaf <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Tinyissue\Providers;
13
14
use Illuminate\Support\ServiceProvider;
15
use Tinyissue\Services;
16
17
/**
18
 * AppServiceProvider is the application service provider for bootstrapping and registering global services.
19
 *
20
 * @author Mohamed Alsharaf <[email protected]>
21
 */
22
class AppServiceProvider extends ServiceProvider
23
{
24
    /**
25
     * Bootstrap any application services.
26
     */
27 59
    public function boot()
28
    {
29 59
    }
30
31
    /**
32
     * Register any application services.
33
     *
34
     * This service provider is a great spot to register your various container
35
     * bindings with the application. As you can see, we are registering our
36
     * "Registrar" implementation here. You can add your own bindings too!
37
     */
38 59
    public function register()
39
    {
40 59
        $this->app->bind(
41 59
                'Illuminate\Contracts\Auth\Registrar', 'Tinyissue\Services\Registrar'
42
        );
43
44
        $this->app['artisan.tinyissue.install'] = $this->app->share(function () {
45
            return new \Tinyissue\Console\Commands\Install();
46 59
        });
47
48 59
        $this->commands('artisan.tinyissue.install');
49
50 59
        $this->app['tinyissue.settings'] = $this->app->share(function () {
51 59
            return new Services\SettingsManager();
52 59
        });
53 59
    }
54
}
55