LaravelMapboxServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 9 1
A boot() 0 4 1
1
<?php
2
3
namespace Bakerkretzmar\LaravelMapbox;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class LaravelMapboxServiceProvider extends ServiceProvider
8
{
9 36
    public function boot()
10
    {
11 36
        $this->publishes([
12 36
            __DIR__.'/../config/laravel-mapbox.php' => config_path('laravel-mapbox.php'),
13
        ]);
14 36
    }
15
16 36
    public function register()
17
    {
18 36
        $this->mergeConfigFrom(__DIR__.'/../config/laravel-mapbox.php', 'laravel-mapbox');
19
20
        $this->app->singleton(Mapbox::class, function () {
21 36
            return new Mapbox(config('laravel-mapbox'));
22 36
        });
23
24 36
        $this->app->alias(Mapbox::class, 'mapbox');
25 36
    }
26
}
27