ShortenerServiceProvider::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 5
cts 5
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
crap 1
1
<?php
2
3
namespace LeadThread\Shortener;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class ShortenerServiceProvider extends ServiceProvider
8
{
9 30
    public function register() {
10 30
        $this->mergeConfigFrom(__DIR__ . '/../config/shortener.php', 'shortener');
11
12 30
        $this->app->singleton('shortener', function() {
13 3
            return new Shortener;
14 30
        });
15 30
    }
16
17 30
    public function boot()
18
    {
19 30
        $this->publishes([
20 30
            __DIR__ . '/../config/shortener.php' => base_path('config/shortener.php'),
21 30
        ]);   
22
    }
23
}