ImaginaryServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 3
dl 0
loc 30
ccs 13
cts 13
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 6 1
A register() 0 10 1
1
<?php
2
3
namespace ArjanWestdorp\Imaginary\Laravel;
4
5
use ArjanWestdorp\Imaginary\Client;
6
use Illuminate\Support\ServiceProvider;
7
8
class ImaginaryServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * Bootstrap the application services.
12
     *
13
     * @return void
14
     */
15 3
    public function boot()
16
    {
17 3
        $this->publishes([
18 3
            __DIR__ . '/../config/imaginary.php' => config_path('imaginary.php'),
19 3
        ], 'config');
20 3
    }
21
22
    /**
23
     * Register the application services.
24
     *
25
     * @return void
26
     */
27 3
    public function register()
28
    {
29 3
        $this->mergeConfigFrom(
30 3
            __DIR__ . '/../config/imaginary.php', 'imaginary'
31 3
        );
32
33 3
        $this->app->bind('imaginary.client', function () {
34 3
            return new Client(config('imaginary'));
35 3
        });
36 3
    }
37
}
38