AssetLibraryServiceProvider::register()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 3
Bugs 0 Features 1
Metric Value
eloc 2
c 3
b 0
f 1
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 10
cc 1
nc 1
nop 0
crap 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