MockServiceProvider::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Blok\Mock;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class MockServiceProvider extends ServiceProvider
8
{
9
    const CONFIG_PATH = __DIR__ . '/../config/mock.php';
10
11
    public function boot()
12
    {
13
        $this->publishes([
14
            self::CONFIG_PATH => config_path('mock.php'),
15
        ], 'config');
16
    }
17
18
    public function register()
19
    {
20
        $this->mergeConfigFrom(
21
            self::CONFIG_PATH,
22
            'mock'
23
        );
24
25
        $this->app->bind('mock', function() {
26
            return new Mock();
27
        });
28
29
        $this->loadRoutesFrom(__DIR__ . "/../routes/web.php");
30
    }
31
}
32