Passed
Push — master ( 88c775...bfde4e )
by Philippe
07:21
created

AssetLibraryServiceProvider::boot()   A

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 0
Metric Value
eloc 5
dl 0
loc 9
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0
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 67
    public function boot()
11
    {
12 67
        (new MediaLibraryServiceProvider($this->app))->boot();
13
14 67
        $this->publishes([
15 67
            __DIR__.'/../config/assetlibary.php' => config_path('thinktomorrow/assetlibrary.php'),
16 67
        ], 'assetlibrary-config');
17
18 67
        $this->loadMigrationsFrom(__DIR__.'/../database/migrations');
19 67
    }
20
21
    /**
22
     * Register any package services.
23
     *
24
     * @return void
25
     */
26 67
    public function register()
27
    {
28 67
        (new MediaLibraryServiceProvider($this->app))->register();
29
30 67
        $this->mergeConfigFrom(__DIR__.'/../config/assetlibrary.php', 'assetlibrary');
31 67
    }
32
}
33