AssetLibraryServiceProvider::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 5
c 1
b 1
f 0
dl 0
loc 9
ccs 6
cts 6
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