AssetLibraryServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 6
Bugs 2 Features 1
Metric Value
wmc 2
eloc 8
c 6
b 2
f 1
dl 0
loc 23
ccs 10
cts 10
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 9 1
A register() 0 5 1
1
<?php
2
3
namespace Thinktomorrow\AssetLibrary;
4
5
use Illuminate\Support\ServiceProvider;
6
use Spatie\MediaLibrary\MediaLibraryServiceProvider;
7
8
class AssetLibraryServiceProvider extends ServiceProvider
9
{
10 99
    public function boot()
11
    {
12 99
        (new MediaLibraryServiceProvider($this->app))->boot();
13
14 99
        $this->publishes([
15 99
            __DIR__.'/../config/assetlibrary.php' => config_path('thinktomorrow/assetlibrary.php'),
16 99
        ], 'assetlibrary-config');
17
18 99
        $this->loadMigrationsFrom(__DIR__.'/../database/migrations');
19 99
    }
20
21
    /**
22
     * Bootstrap any application services.
23
     *
24
     * @return void
25
     */
26 99
    public function register()
27
    {
28 99
        (new MediaLibraryServiceProvider($this->app))->register();
29
30 99
        $this->mergeConfigFrom(__DIR__.'/../config/assetlibrary.php', 'thinktomorrow.assetlibrary');
31 99
    }
32
}
33