ColorServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 60
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 7 1
A boot() 0 6 1
A provides() 0 7 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