Passed
Branch master (485622)
by Andrii
02:18
created

LayerProvider::boot()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 7
nc 1
nop 0
dl 0
loc 11
ccs 0
cts 9
cp 0
crap 2
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Aosmak\Laravel\Layer\Sdk;
4
5
use Illuminate\Support\ServiceProvider;
6
7
/**
8
 * Class LayerProvider
9
 * @package namespace Aosmak\Laravel\Layer\Sdk
10
 */
11
class LayerProvider extends ServiceProvider
12
{
13
    /**
14
     * Bootstrap the application services.
15
     *
16
     * @return void
17
     */
18
    public function boot()
19
    {
20
        $this->publishes([
21
            __DIR__ . '/../config/layer.php' => $this->app->make('path.config') . '/layer.php'
22
        ], 'config');
23
24
        $this->app->bind('Aosmak\Laravel\Layer\Sdk\Services\LayerServiceInterface', function ($app) {
25
            $service = $app->make('Aosmak\Laravel\Layer\Sdk\Services\LayerService');
26
            $service->setConfig($app['config']['layer']);
27
28
            return $service;
29
        });
30
    }
31
32
    /**
33
     * Register the application services.
34
     *
35
     * @return void
36
     */
37
    public function register()
38
    {
39
        //
40
    }
41
}
42