Passed
Branch ci (c888e7)
by Brian
03:39
created

UuidServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Test Coverage

Coverage 88.89%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 7
c 1
b 0
f 0
dl 0
loc 26
ccs 8
cts 9
cp 0.8889
rs 10

2 Methods

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