Completed
Branch ci (563354)
by Brian
14:30
created

UuidServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 90%

Importance

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

2 Methods

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