ColorServiceProvider::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 6
ccs 4
cts 4
cp 1
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
crap 1
1
<?php namespace Arcanedev\Color;
2
3
use Arcanedev\Support\PackageServiceProvider;
4
5
/**
6
 * Class     ColorServiceProvider
7
 *
8
 * @package  Arcanedev\Color
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
class ColorServiceProvider extends PackageServiceProvider
12
{
13
    /* -----------------------------------------------------------------
14
     |  Properties
15
     | -----------------------------------------------------------------
16
     */
17
18
    /**
19
     * Package name.
20
     *
21
     * @var string
22
     */
23
    protected $package = 'color';
24
25
    /**
26
     * Indicates if loading of the provider is deferred.
27
     *
28
     * @var bool
29
     */
30
    protected $defer = true;
31
32
    /* -----------------------------------------------------------------
33
     |  Main Methods
34
     | -----------------------------------------------------------------
35
     */
36
37
    /**
38
     * Register any application services.
39
     */
40 57
    public function register()
41
    {
42 57
        parent::register();
43
44 57
        $this->bind(Contracts\Color::class, Color::class);
45 57
        $this->bind(Contracts\ColorConverter::class, ColorConverter::class);
46 57
    }
47
48
    /**
49
     * Bootstrap any application services.
50
     */
51 57
    public function boot()
52
    {
53 57
        parent::boot();
54
55 57
        $this->loadTranslations();
56 57
    }
57
58
    /**
59
     * Get the services provided by the provider.
60
     *
61
     * @return array
62
     */
63 6
    public function provides()
64
    {
65
        return [
66 6
            Contracts\Color::class,
67
            Contracts\ColorConverter::class,
68
        ];
69
    }
70
}
71